Passing Parameters

N

Nexus

hi, i'm tryng to supply two different values into two
parameters in my stored procedure.
Both the values comes from my VB variables. The variables
are strVendorID
and strCompanyName. The parameters in my stored procedure
are @VendorID and @CompanyName

My codes are as followed:

--
DoCmd.RunSQL "EXECUTE insert_vendor1 @VendorID = " &
strVendorID
--

The above codes only passes one value to one parameter.
How can i pass both values into both the parameter?

Is it something like this?

DoCmd.RunSQL "EXECUTE insert_vendor1 @VendorID = " &
strVendorID, "@CompanyName = " & strCompanyName
 
I

Igor V. Makeev

Hello, Nexus!
You wrote in message on Thu, 16 Sep 2004 23:38:05 -0700:

N> How can i pass both values into both the parameter?
N> Is it something like this?

DoCmd.RunSQL "EXECUTE insert_vendor1 @VendorID = " & strVendorID & _
", @CompanyName = '" & strCompanyName & "'"

With best regards, Igor.
ICQ: 111469481
 
D

dorna

Nexus said:
hi, i'm tryng to supply two different values into two
parameters in my stored procedure.
Both the values comes from my VB variables. The variables
are strVendorID
and strCompanyName. The parameters in my stored procedure
are @VendorID and @CompanyName

My codes are as followed:

--
DoCmd.RunSQL "EXECUTE insert_vendor1 @VendorID = " &
strVendorID
--

The above codes only passes one value to one parameter.
How can i pass both values into both the parameter?

Is it something like this?

DoCmd.RunSQL "EXECUTE insert_vendor1 @VendorID = " &
strVendorID, "@CompanyName = " & strCompanyName
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top