Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » Samples » Downloads
 
Add your own
alternative version
Go to top

C# and Table Value Parameters

, 20 Aug 2009
How to send bulk data using table value parameters from C#
TableValueParameters.zip
TableValueParameters
TableValueDatabase
Properties
Database.sqlcmdvars
Database.sqldeployment
Database.sqlpermissions
Database.sqlsettings
Schema Objects
Stored Procedures
Tables
Types
sql
debug
Database.sqlcmdvars
Database.sqldeployment
Database.sqlsettings
Microsoft.SqlTypes.dbschema
TableValueDatabase.dbschema
TableValueDatabase.deploymanifest
release
TableValueDatabase.dbmdl
TableValueDatabase.dbproj
TableValueDatabase.dbproj.schemaview
TableValueDatabase.dbproj.user
TableValueParameters
bin
Debug
Database
SampleDB.mdf
SampleDB_log.ldf
TableValueParameters.exe
TableValueParameters.pdb
TableValueParameters.vshost.exe
TableValueParameters.vshost.exe.manifest
Release
Database
SampleDB.mdf
SampleDB_log.LDF
Properties
Settings.settings
TableValueParameters.csproj.user
TableValueParameters.suo
-- This is the sample script to test the SP

-- An instance of the Table parameter type is created
Declare	@SampelData	As	[dbo].[SampleDataType]
-- and then filled with the set of values
Insert	Into	@SampelData(SampleString, SampleInt) Values('1',1);
Insert	Into	@SampelData(SampleString, SampleInt) Values('2',null);
Insert	Into	@SampelData(SampleString, SampleInt) Values('3',3);

Select * From @SampelData
-- we then call the SP to store the values
Exec SampleProcedure @SampelData

Select *  From SampleTable

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

gaurav_verma_mca
Architect Imfinity
India India
Hi I have been working on enterprise applications for last six years.

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 20 Aug 2009
Article Copyright 2009 by gaurav_verma_mca
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid