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!

Stored Procedure and recordset problems

Status
Not open for further replies.

SchuhTL

Technical User
Dec 19, 2001
36
US
I have a stored procedure that I know is executing (sql query profiler) correctly and returning results however I am having problems filling session varables with the results of the recordset. Why am I doing wrong with the recordset?

set objConn = server.CreateObject("ADODB.Command")
set rsRTest = server.CreateObject "ADODB.recordset")
objConn.ActiveConnection = strConnect objConn.CommandText = "usp_GetTest"
objConn.CommandType = adCmdStoredProc
set objParam =(objConn.CreateParameter "@parm1",adVarChar, adParamInput, 50)

objConn.Parameters.Append ObjParam
objConn.Parameters("@parm1")= session("user")

set rsTest = objConn.Execute

if not rsTest.EOF then
session("Request") = rsTest("Request")
session("Group") = rsTest("Group")
end if
 
DreXor,

Thanks for the quick response, when looking at the links provided it looks like I am doing everything correctly. Here is my stored proc. In query profiler I can see that the proc is being executed with the correct parameter. I am so confused?????

CREATE PROCEDURE dbo.usp_GetTest
@parm1 varchar(50)
AS

SET NOCOUNT ON

SELECT * from Testtable where user = @parm1

GO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top