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

Returning a single variable from stored proc instead of recordset?

Status
Not open for further replies.

jacktripper

Programmer
Dec 5, 2001
124
US
Its been a while since I used classic ASP. I'm trying to modify some old code someone else wrote.

The code calls a stored procedure which returns a recordset. I want to change it so that it returns a single string variable that is defined in the proc.

So, the proc has an OUTPUT value of a @ReturnMessage string. But, the ASP code is currently:

set conn = CreateObject("ADODB.Connection")
conn.open Application("DB_ConnectionString")
set rs = CreateObject("ADODB.Recordset")
rs.open vcSQL,conn,1,1

This doesn't seem to work if all I am returning is a string result. I just get a big error message. The proc itself seems to run if I execute it in SQL Server.

Is there classic ASP code that can expect the result as something other than a recordset?

This is probably really simple, but it's not coming to me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top