Jun 09, 2009 10:51 PM|hans_v|LINK
Please take a good look at what I said! In the SQL statement, you insert values into 12 fields, so that's why I said that you should add 12 parameters, but you only provide 11 (Region is missing), that's the explanation off the error!
I declared the first parameter as object, because from your code, I saw that it can also be a Null value. I also said that you should convert Date to Ole Automation Dates, because sometimes a normal date causes an error. For strings, you don't have to declare
an object, you can just declare it as a string. In the example I gave you, I provided a value for the variable. You just declared 11 (like I said, it should be 12), objects, but you don't assign a value. So before you add the parameters to the command's parameter
collection, first assign a value to all the variables you declared, and then add the variables as parameters. In your example, you add empty objects into the parameter collection, and then you assign values to only 4 of them????
Maybe a tip. Try to understand the principle using a test table with just a couple of (string) fields, like in Mike's article!