Andy (kc2ine@yahoo.com) writes:
And? Either the parameters are similar in kind, in which you can do this
in a loop.
Or they are of different data types, in which case you will need to treat
all 200 parameters differently, no matter which method you use. If you
interpolate the parameter values into the string, you need to know which
to put quotes around and which not. You need to know which are dates, so
that you convert them to a safe format (YYYYMMDD). You need to convert
integer and binary values to string etc.
And if you use parameters, you may be better of to put the parameter
information in an array, and then run a loop that runs CreateParameter
taking the values from the array.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx