DataSet as argument for Sql server stored procedure

H

henk gijsbert

Can I use a dataset as an argument for a SQL server stored procedure
that I want to call from ADO.NET?
 
D

David Browne

Also you can XML-Serialize it and pass it to a non-CLR stored procedure,
where it can be shreaded and merged with TSQL.

David
 
S

Sahil Malik [MVP C#]

Yes - using OPENXML

That will work though with SQLCLR around, that should be choice #2 IMO for 3
reasons
a) Performance
b) The fact that you must clean up after sp_xml_preparedocument <-- (or
something like that).
c) You have to be careful in XML serializing the dataset, with the changes
inclusive.

Anyway, yes that will also work, so thanks for adding to the list.

BTW, if you're on .NET 1.1/SQL2k, then OPENXML is about your only choice.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top