Click here to Skip to main content
15,885,998 members
Articles / Web Development / ASP.NET

Sending a DataTable to a Stored Procedure

Rate me:
Please Sign up or sign in to vote.
4.75/5 (51 votes)
10 Jul 2012CPOL3 min read 331.1K   3.4K   104  
Sending a DataTable to a Stored Procedure using Table Valued Parameters.
<?xml version="1.0"?>
<configuration>
	<system.web>
		<!--
          Set compilation debug="true" to insert debugging
          symbols into the compiled page. Because this
          affects performance, set this value to true only
          during development.
    -->
		<compilation debug="true" targetFramework="4.0">
			<assemblies>
				<add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
				<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
		</compilation>
		<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
	<system.web.extensions>
		<scripting>
			<webServices>
				<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
				<!--
      <jsonSerialization maxJsonLength="500">
        <converters>
          <add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
        </converters>
      </jsonSerialization>
      -->
				<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
				<!--
        <authenticationService enabled="true" requireSSL = "true|false"/>
      -->
				<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
           and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
           writeAccessProperties attributes. -->
				<!--
      <profileService enabled="true"
                      readAccessProperties="propertyname1,propertyname2"
                      writeAccessProperties="propertyname1,propertyname2" />
      -->
			</webServices>
			<!--
      <scriptResourceHandler enableCompression="true" enableCaching="true" />
      -->
		</scripting>
	</system.web.extensions>
	<connectionStrings>
		<add name="EmpCon" connectionString="Data Source=IBM\IBMDB;Initial Catalog=Testing;User ID=team;Password=kals123"/>
	</connectionStrings>
</configuration>

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)


Written By
Software Developer (Senior)
Malaysia Malaysia
I've been working with various Microsoft Technologies. I have earned my Microsoft Certified Technology Specialist (MCTS) certification. I'm a highly motivated self-starter with an attitude for learning new skills and utilizing that in my work.


--Amit Kumar
You can reach me at:
Facebook | Linkedin | Twitter | Google+

Comments and Discussions