>The CreateParameter method takes care of that for you. If you pass in a string it will be a string. If you pass in a zero it will be an integer. The length gets set also. I just tested and with a string of "00" the length gets set to 2.
>Tim
>
Ok, I'm also guessing you have overloads to pass length and type explicitly, right?
BTW, do you have to create parameter as IDbDataParameter or you can create it as SQLParameter (and probably cast the result of it to SQLParameter unless another method exists).
Also, do you agree that the extra declaration of a parameter seems like a typo in the manual?
If it's not broken, fix it until it is.
My Blog