Pass Tables to Stored Procedure / Table Valued Parameter
page 1 of 3
Published: 06 Nov 2009
Unedited - Community Contributed
Abstract
When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a SQLBulkCopy object available in .NET to send multiple rows of data to SQL Server at once, but this still cannot be passed to a stored procedure. SQL Server 2008 provides a new feature called "Table-Valued Parameters". This provides us the ability to easily pass a table to a stored procedure from T-SQL code or from an application as a parameter.
by Aamod Thakur
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 6116/ 317

Introduction

When we have to pass multiple rows of data to SQL Server the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML datatype to pass data which is a bit complex and tedious to use. Also there is a SQLBulkCopy object available in .Net to send multiple rows of data to SQL Server at once, but the data still can not be passed to a stored procedure.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 6 and 6 and type the answer here:

User Comments

Title: good article   
Name: manas sahu
Date: 12/23/2009 8:46:08 AM
Comment:
Good article but not what i m looking for.
Title: Title misleading   
Name: Chin Kiat
Date: 12/8/2009 1:26:10 AM
Comment:
The title is not match to what you are posting...i understand why jeewan disaapointed =(
Title: disappointed   
Name: jeewan
Date: 11/20/2009 5:48:05 AM
Comment:
Not what i am searching
http://pictube1.blogspot.com/






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2010 ASPAlliance.com  |  Page Processed at 2/9/2010 11:39:11 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search