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 and executing a SELECT statement to a stored procedure

Status
Not open for further replies.

towser

Programmer
Feb 19, 2001
29
GB
I'm having trouble with a stored procedure. In VB I am setting a passed parameter like this :-

IN_SQL = "SELECT * FROM SUMMARIES WHERE client = 1234 and driver = 'SMITH' "

This is then being sent to a stored procedure which is using this paramater to fill a cursor ref :-

OPEN cursor_ref FOR IN_SQL;

Can anyone help, please ?
n.b
( I haven't included the rest of the stored procedure as I'm positive the error lies in how I've passed the SELECT statement, I've previously executed the stored procedure with the select statement hardcoded in it and it works )

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top