Re: stored proc error - ADO and DB2
"Buddy Robbins" <Buddy_Robbins@sbcglobal.net> wrote in message
news:%23prTRNGNEHA.3312@tk2msftngp13.phx.gbl...
>
> Hey CC,
> Just judging by the error message you're getting (never having to use DB2
> before) I would guess that your problem is that you are calling the
> cmd.Parameters.Refresh method, which should auto-populate your Parameter
> collection in the Command object, and then incorrectly creating 2 other
> parameters to add to the collection.
>
> The two new Parameters that you are creating as new.
> This is an incorrect way to create parameters. You should call the
> Cmd.CreateParameter method to create the parameter, set the values, and
then
> append it to the Paramters collection.
>
> The bottom line is that you should only do one of the two-
> Cmd.Parameters.Refresh (Which is inefficient if the parameter list doesn't
> change), or Cmd.Parameters.Append(Cmd.CreateParameter(...)) (my personal
> favorite).
>
> --Buddy Robbins
> MCSD, MCSE, MCDBA
>
>
Thanks for that Buddy!
I've taken this back to the DB2 where I'm getting errors just trying to call
the stored proc.
cheers,
Norm |