Blog
 English (United Kingdom) English (United States)
10 September 2010

This will only work with SQL Server 2008 and above as it requires a new feature of SQL Server only present in 2008 and 2008 R2: Table Value Parameters.

Previously when we wanted to provide SQL with a set of data, e.g. a table, we had to pass in XML and parse that within the SQL. SQL’s parsing of XML isn’t great when dealing with large quantities of data. Additionally we want the data in table form anyway, so why bother with the XML? Ideally we just want to be able to pass in a table to SQL, just like we can get tables out.

In this post I’m going to go through the steps in both SQL and C# to allow you to do this. My examples use C# 3.5 and above (through use of Linq) but it could be easily converted to .NET 2.0.

Step One – Create the Data Table Type in SQL Use SQL Server Management Studio to navigate to the correct database. First thing we need to do is define a Table Type. This is a requirement of passing Table value parameters to a Stored Procedure. In this post I’m going to use an example...

Read More »

There were riots at the door as people vied for seats at Web Applications’ prestigious UGS. Luckily no one was seriously injured during the stampede, except of course our humility. What an awesome response. Really though, we love the support our faithful clients showed us in their attendance - and if you happened to miss it, here’s the run-down of the seminar. Get ready for a long post.   

Read More »

Web Applications’ Darren Mitchinson will be going to the Buxton Cup Final this Sunday in a bid to win the Championship with his team, Inter Web.

Read More »

Blogs
Minimize


Search Blog
Minimize


Archive
Minimize


Subscribe to our feed |  Privacy Statement |  Terms Of Use
© Copyright 2010 by Web Applications UK Ltd.