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): 1425/ 679

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 1 and 8 and type the answer here:

User Comments

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-2009 ASPAlliance.com  |  Page Processed at 11/21/2009 9:09:31 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search