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!

pass parameters to stored procedure

Status
Not open for further replies.

gogetsome

Technical User
May 27, 2004
21
US
Hello, Can someone please show me an example of how to pass a parameter to a stored procedure? I have a crystal report that uses the stored procudure. I can call the procedure with this:


Set s = CreateObject("InternetExplorer.application")
s.Visible = True s.Navigate " '?prompt0=" & JobStatus.Job & "&prompt1=" & CStr(Now)

Any help would be great!
 
oops, that should have been, I can call the report with:
 
Ok, I've come up with this so far but it is erroring out on the first parameter with "(objComm,parameters(...=<item cannot be found in the collection correspond...

here is where I am at the moment. Any help would be great!

Private Sub InvPrint_BeforeUserChanged(KeepFocus As Boolean, CancelLogic As Boolean)

Dim objCmd As ADODB.Command
Set objCmd = New ADODB.Command

objCmd.CommandText = "cssp_Maintenance_Invoice"
objCmd.CommandType = adCmdStoredProc
objCmd.Parameters("@invBeg").Value = "invBeg"
objCmd.Parameters("@invEnd").Value = "invEnd"
objCmd.Execute


Set s = CreateObject("InternetExplorer.application")
s.Visible = True
s.Navigate " '?prompt0=" & JobStatus.Job & "&prompt1=" & CStr(Now)

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top