Electron Shepherd wrote:
all you needed to do was double up any single quotes in each parameter
How about for NULL (no quotes, though that wouldn't be much use in the specific case of an IN operator)? And for date times ("3/6/2010" is March 6th or June 3rd, and that doesn't even take into account millisecond precision)? And for numbers (no quoting necessary)? And when C# uses scientific notation to represent numbers but SQL Server does not ("100000000.0" vs "1.0E8")? Or when a different culture processes certain data types (e.g., date times) differently? Not so simple after all, now is it? And I think it wasn't very hard to create a list of strings in the format "@param0, @param1, ..., @paramN". As far as bulk inserts... that is quite efficient. But different strokes for different folks.
[Forum Guidelines]