Download presentation
Presentation is loading. Please wait.
Published byEthan Briggs Modified over 8 years ago
1
Tobias Ternstrom Senior Program Manager Lead SQL Server Engine SESSION CODE: DAT404
6
// C# cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "Test.spDelimitedString"; cmd.Parameters.AddWithValue("@Values", @"…|…|… …|…|… …|…|…"); cmd.Execute…; -- T-SQL: What happens on the server? EXEC Test.spDelimitedString @Values = '…|…|… …|…|… …|…|…';
8
// C# cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "Test.spXML"; cmd.Parameters.AddWithValue("@Values", xmlDoc.OuterXml); cmd.Execute…; -- T-SQL: What happens on the server? EXEC Test.spXML @Values = N' <Order…
10
// C# cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "Test.spTVP"; var p = cmd.Parameters.Add("@Values“, SqlDbType.Structured); p.TypeName = "Test.OrderTableType"; p.Value = dataTable; cmd.Execute…; -- T-SQL: What happens on the server? DECLARE @Values Test.OrderTableType; INSERT @Values … EXEC Test.spTVP @Values = @Values;
12
// C# class MyStreamingTvp : IEnumerable { … } … cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "Test.spTVP"; var p = cmd.Parameters.Add("@Values", SqlDbType.Structured); p.TypeName = "Test.OrderTableType"; p.Value = new MyStreamingTvp(…); cmd.Execute…; -- T-SQL: What happens on the server?: DECLARE @Values Test.OrderTableType; INSERT @Values … EXEC Test.spTVP @Values = @Values;
19
2. Querying the data
20
Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub.
21
www.microsoft.com/teched www.microsoft.com/learning http://microsoft.com/technet http://microsoft.com/msdn
23
Sign up for Tech·Ed 2011 and save $500 starting June 8 – June 31 st http://northamerica.msteched.com/registration You can also register at the North America 2011 kiosk located at registration Join us in Atlanta next year
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.