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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing parameters

Status
Not open for further replies.

EscapeUK

Programmer
Jul 7, 2000
438
GB
I have a stored procedure that requires to parameters, hpow do i cal this from VB
 
You use the Command Object in ADO.
Parameters are added via use of the Parameters collections.

Code:
set cmInsert = New ADODB.Command
cmInsert.CommandType = adStoredProc
cmInsert.CommandText = "StoredProcName"
cmInsert.Parameters.Append cmInsert.CreateParameter("ParamName", adInteger, adParamInput,,110)
cmInsert.Execute

The above example calls a Stored Procedure that has one parameter of type integer that is an input parameter. The last parameter in CreateParameter method is the value to be passed to the Parameter in the stored procedure.

James :) James Culshaw
jculshaw@active-data-solutions.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top