Re: stored proc error - ADO and DB2
From: ColdCanuck (cold_at_canuck.ca)
Date: 05/07/04
- Next message: Tom Murray: "RE: mdac license agreement blank on win98"
- Previous message: Alan Freiden: "Re: Creating a Workgroup Information File"
- In reply to: Buddy Robbins: "Re: stored proc error - ADO and DB2"
- Next in thread: ColdCanuck: "Re: stored proc error - ADO and DB2"
- Reply: ColdCanuck: "Re: stored proc error - ADO and DB2"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Tom Murray: "RE: mdac license agreement blank on win98"
- Previous message: Alan Freiden: "Re: Creating a Workgroup Information File"
- In reply to: Buddy Robbins: "Re: stored proc error - ADO and DB2"
- Next in thread: ColdCanuck: "Re: stored proc error - ADO and DB2"
- Reply: ColdCanuck: "Re: stored proc error - ADO and DB2"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|