The Active Network
ActiveMac Anonymous | Create a User | Reviews | News | Forums | Advertise  
 

  *  

  Introducing Table-Valued Parameters - Part 1
Time: 22:06 EST/03:06 GMT | News Source: Microsoft | Posted By: Jonathan Tigner

I am Himanshu. I am a program manager in the ADO.Net team. Today I am going to talk about Table-Valued parameters that are new in SQL Server 2008. About 4 years back I was writing an application which involved adding metadata about my music library into a database. The database had a table each for storing Artists, Albums, and Songs. While adding an Album of songs into the database I had to insert data into each of these tables. I had defined stored procedure for inserting data into each of the tables. In the first iteration there was a bug in the code due to which these operations were not being done in a single transaction. Needless to say this bug surfaced as a data-corruption issue later on. Once identified the fix was trivial, ensure that all commands are executed in a single transaction. However, what I would have really liked to do was to be able to call a single stored procedure to which I could pass the metadata about the Album and the list of songs at the same time. But there was no good way of accomplishing this back then. I was programming against SQL Server 2000 back then. I am excited to say that now with the new table-valued parameters in SQL Server 2008 I can finally write a single stored procedure that will let me accomplish this without any kind of hacks!

Table-Valued parameters, as the name suggests lets you pass a table as parameter to a stored procedure. In order to use table-valued parameters you need to define a table type and then use the table type in the definition of the stored procedure. Let me illustrate this with the help of an example. I am going to first create a table type named Songs_TableType with two columns, Title and TrackNumber. Then I will use it in a stored procedure to pass a table as parameter.

Write Comment
Return to News

  Displaying 701 through 705 of 705
Prev | First
  The time now is 6:37:28 PM ET.
Any comment problems? E-mail us
#701 By 4240821 (45.192.45.37) at 11/17/2025 10:22:15 PM
https://telegra.ph/A-New-Era-in-MMA-Dawns-as-shavkat-rakhmonov-Takes-Center-Stage-11-16
https://telegra.ph/Ecuadors-Unexpected-Surge-How-a-Small-Nation-is-Making-Waves-on-the-Global-Stage-11-16
https://telegra.ph/Tracy-Cortez-Stuns-Fans-with-Unstoppable-Win-at-UFC-Heartstopper-11-16
https://telegra.ph/Emergency-Helicopter-Crash-Shocks-Wellington-Authorities-Scramble-for-Answers-11-16
https://telegra.ph/Revolutionary-Nursery-Designs-Boost-Child-Development-and-Environmental-Sustainability-11-16
https://telegra.ph/Eubank-vs-Benn-2-The-Thrilling-Rematch-11-16-2
https://telegra.ph/Eubank-vs-Benn-2-The-Unstoppable-Force-Meets-the-Immovable-Object-11-16
https://telegra.ph/Stockholm-busunfall-sparks-urgent-safety-overhaul-passengers-left-shaken-11-16
https://telegra.ph/Stranger-Things-Cast-Reunites-for-Final-Season-Mystery-11-16
https://telegra.ph/roman-kopylov-unveils-fictional-breakthrough-that-rocks-the-internet-11-16-3

#702 By 4240821 (82.115.4.230) at 11/17/2025 11:11:02 PM
https://nsfw.su/activfbbg25hf4f
https://lustful.su/activ45badbffca
https://sluts.su/activ1fec4dh5fh
https://nsfw.su/activfb4ad5fa31
https://nsfw.su/activ4e23adahch
https://sluts.su/activag124a34hg
https://nsfw.su/activfh5da3aa3e
https://sexonly.su/activ1f1hcd2gb1
https://sexonly.top/activc534h4fbcd
https://smutty.su/activbhfeddff3c

#703 By 4240821 (82.115.4.230) at 11/19/2025 8:56:01 AM
https://lustful.su/activ155e241bc2
https://smutty.su/activb1c245d4fc
https://sexonly.su/activ1hdb4cdfad
https://nsfw.su/activ2b1414h521
https://sluts.su/activg5b3aa2a34
https://sluts.su/activag2ebb23gg
https://lustful.su/activhda4a5aea5
https://sexonly.su/activeeb311ffb4
https://lustful.su/activgdhcdcfd3h
https://sexonly.su/activc2gdad5d3b

#704 By 4240821 (82.115.4.230) at 11/19/2025 11:11:44 AM
https://smutty.su/activ21bhbddgab
https://sluts.su/activ1aa21c4h4b
https://smutty.su/activgh3bdhcd5e
https://sluts.su/activd2aa2gdc11
https://sluts.su/activgcdcg4h5hg
https://smutty.su/activ5hf2fb35dh
https://sluts.su/activa5h144a55b
https://nsfw.su/activ524c1ed11f
https://sexonly.top/activad1fe1eehh
https://sexonly.su/activ2d4bhghheh

#705 By 4240821 (82.115.4.230) at 11/20/2025 6:27:09 PM
https://lustful.su/activcdbcffceh2
https://lustful.su/activef3af3aga2
https://sexonly.top/activ25ch4ad225
https://sexonly.su/activ331h51e4a4
https://lustful.su/activg3db3b5gg2
https://sexonly.top/activbdcgccbgef
https://sexonly.top/activbf1h4g3ca2
https://lustful.su/activgbfcd51a22
https://lustful.su/activa2da4h1cf3
https://sexonly.top/activh3gh2ac1ce

Write Comment
Return to News
  Displaying 701 through 705 of 705
Prev | First
  The time now is 6:37:28 PM ET.
Any comment problems? E-mail us
User name and password:

 

  *  
  *   *