I’m trying to work out what the best method to passing a large number of parameters into a stored procedure.
Some methods i was thinking about are;
-
Create the relevant database objects, including a parameter object for each item and invoke the command object
-
Pass in an XML document and have the stored procedure unpack it. (The app will already them in XML format)
If anyone has any better ideas, i’m open to hear them
Thanks.
XML processing is very handy for handling large numbers of parameters. You can easily pass in your parameters in XML and then xml handling to get your values out. Its even better if your data is already .Net.
e.g.
This should return 3 rows : 3, 6, 15. Its easy to open this up to pull the values you need out and manipulate them.