Pass SP an "Array" or .NET loop and multiple SP calls

  • Okay folks, here's my situation. A .NET process will be shredding an XML document which will have a list of transactions that will need to be passed to a stored procedure which will insert into a table. There can be N number of transactions and there will be 3 values I will be passed. I can have the .NET application loop over the transactions and call the SP for each one or I can have the .NET application pass an "array" that I will parse in SQL. There is logic to determine which transactions will be passed so you can't just pass the XML document. The current production SQL Server is 2005, so I can't do a table-valued parameter and I'm not sure I would even if I could because of some of the limitations.

    What are your recommendations? Loop and 1 at a time or some kind of "array" that I parse in SQL?

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

  • Impedance mismatch...there is no right answer. Do whatever is easiest for you to code and maintain, and performs well enough to meet your SLA.

    There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply