Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open a recordset and pass parameter to stored proc -- is it possible?

Status
Not open for further replies.

automicgina

Programmer
Apr 10, 2002
18
US
I have a stored proc that takes a parameter from the program and return a set of data. I can pass the parameter using ADODB.Command, but not ADODB.Recordset (there's no option to pass parameter). Is it even possible? If not, what's the better way to do it?
 
i believe you can do this:

dim cmd as new Command
dim rs as new RecordSet

set cmd.activeconnection = cnMyConnection
cmd.commandtype = adcmdstoredproc
cmd.commandtext = "myProc" ' name of stored proc
....
' set up parameters collection
....

rs.open cmd

hope this helps

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top