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

string parameters to a Stored Procedure

Status
Not open for further replies.

mushin

Programmer
Oct 4, 2000
49
VB 6 & SQL Server 7***************************

This is drivin me nuts ! Just trying to pass a string variable to a stored proc and I keep getting runtime errors for the odbc driver.

If I hard code the value in my stored proc and eliminate the reference in the call, it works fine.

Why can I not pass the var into the Proc ?
There are no return vals just the record set .


objRS.Open "sel_admission_sequences, (' " _
& strPtId " ') ", _
objconn, adOpenStatic, adLockReadOnly, adCmdStoredProc

Any ideas ? I may be doing someting obvious to most as I am not an accomplish Vb guy, just building some prototypes..
 
objRS.Open "sel_admission_sequences, (' " _
& strPtId & " ') ", _
objconn, adOpenStatic, adLockReadOnly, adCmdStoredProc Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
Thx for the reply, but I am using the 2nd & after the strPtid. I must have deleted it in my post while editing it. I doublecheckd and still get the same errors.....
 
again, this my be simply a typo in the post, but you might try removing the comma after the proc name
Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top