Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Stored Proc Paramter error


Message #1 by "Niall Hannon (ext. 772)" <Niall.Hannon@f...> on Thu, 14 Nov 2002 18:19:44 -0000
Found the prob - 
 objcmd.Parameters.Append .CreateParameter(pma_product, adVarChar,
> adParamInput, 20)

Need to specify varaiable at end as so
 objcmd.Parameters.Append .CreateParameter(pma_product, adVarChar,
> adParamInput, 20, VarName
)
-----Original Message-----
From: Gonzalo Martin Bianchi [mailto:gbianchi@a...]
Sent: 14 November 2002 18:26
To: professional vb
Subject: [pro_vb] Re: Stored Proc Paramter error


hi there..

i don't know about your particular problem..



but why are you using a with if you are calling the object in every line???


Gonzalo Martin Bianchi
Desarrollo de sistemas de cuenta corriente tributaria
Hipolito Yrigoyen 370
Entrepiso B pasillo 600 oficina 5
4347-3181
----- Original Message -----
From: "Niall Hannon (ext. 772)" <Niall.Hannon@f...>
To: "professional vb" <pro_vb@p...>
Sent: Thursday, November 14, 2002 3:19 PM
Subject: [pro_vb] Stored Proc Paramter error


> Hi,
>
> Keep getting error "procedure expects variable @Notes that was not
supplied
> etc" from following code in vb. It must be something small but I just cant
> see it!!!
>
> Thanks
> Niall
>
> Dim objcmd As New ADODB.Command
> Dim note As String
> Dim pma_product As String
>
> note = "customers"
> If ConnectDB = "life" Then
>     pma_product = "Life"
> ElseIf ConnectDB = "Client" Then
>     pma_product = "Client"
> End If
>
>
> With objcmd
>     objcmd.ActiveConnection = hFB
>     objcmd.CommandText = "dbo.C_Update_TCustomer"
>     objcmd.CommandType = adCmdStoredProc
>     objcmd.Parameters.Append .CreateParameter(note, adVarChar,
adParamInput,
> 20)
>     objcmd.Parameters.Append .CreateParameter(pma_product, adVarChar,
> adParamInput, 20)
>     objcmd.Execute
> End With
>
>
> W
>
>
> **************************************************************************
> The information contained in this e-mail is confidential,
> may be privileged and is intended only for the use of the
> recipient named above. If you are not the intended
> recipient or a representative of the intended recipient,
> you have received this e-mail in error and must not copy,
> use or disclose the contents of this email to anybody
> else. If you have received this e-mail in error, please
> notify the sender immediately by return e-mail and
> permanently delete the copy you received. This email has
> been swept for computer viruses. However, you should
> carry out your own virus checks.
>
>
> Registered in Ireland, No. 205721. http://www.FINEOS.com
> **************************************************************************
>
>



  Return to Index