>If you want to call it this way you need to refresh the parameters collection by adding .Parameters.Refresh() before the endwith on the ocmd. The collection is empty unless you check the server first.
>
>The alternative is to append the parameter manually by using .Parameters.Append() and .CreateParameter().
>
Just before I got this from you, I used .parameters.append() method...it works. ocmd.parameters.refresh() is not working. I guess it is better this way; I know the names of the parameters, so I shouldn't make a trip to the server to find out what I already know.
But this still leaves me wondering. For the stored procedures in my database, the parameters are populated as soon as oCmd.commandText is set. IOW, the trip to the server is made at that point, without issuing .parameters.refresh().
Thanks for the help,
Steve Gibson