Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tobias Ternstrom Senior Program Manager Lead SQL Server Engine SESSION CODE: DAT404.

Similar presentations


Presentation on theme: "Tobias Ternstrom Senior Program Manager Lead SQL Server Engine SESSION CODE: DAT404."— Presentation transcript:

1 Tobias Ternstrom Senior Program Manager Lead SQL Server Engine SESSION CODE: DAT404

2

3

4

5

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 = '…|…|… …|…|… …|…|…';

7

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…

9

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;

11

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;

13

14

15

16

17

18

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

22

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

24

25


Download ppt "Tobias Ternstrom Senior Program Manager Lead SQL Server Engine SESSION CODE: DAT404."

Similar presentations


Ads by Google