Re: stored proc error - ADO and DB2

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: ColdCanuck (cold_at_canuck.ca)
Date: 05/07/04


Date: Fri, 07 May 2004 20:48:48 GMT


"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



Relevant Pages

  • Re: stored proc error - ADO and DB2
    ... > Hey CC, ... > before) I would guess that your problem is that you are calling the ... which should auto-populate your Parameter ... > This is an incorrect way to create parameters. ...
    (microsoft.public.vb.database.ado)
  • Re: stored proc error - ADO and DB2
    ... > Hey CC, ... > before) I would guess that your problem is that you are calling the ... which should auto-populate your Parameter ... > This is an incorrect way to create parameters. ...
    (microsoft.public.data.oledb)
  • Re: Ars Technica Aperture Review
    ... >>> He and others made CMYK support seem to be a consequence of Mac OS ... >> Incorrect. ... Sandman is calling the reviewer a liar now as well? ...
    (comp.sys.mac.advocacy)
  • Re: Agressive dog
    ... And hey! ... Maybe that's why you're incorrect so often. ... Perhaps on occasion you could try listening to someone else ...
    (rec.pets.dogs.behavior)
  • Re: system date loop...?
    ... Hey, ... System clock looping 4 sec loop. ... Dates are incorrect so I don't know if I can trust log files.... ...
    (comp.unix.solaris)