Hey guys, I'm in need of some serious help. I've been working on an intranet and i've been doing the frontend stuff (asp and html) and another guy has been working on the backend in sql server. so anyways, he's been on sql training for this week and remotely working on the database from home. he's been doing some funky new things that have completely confused me.he's written this procedure: create procedure User_Details @accountName varchar(50), @code bit OutputAs declare @result table ([User_ID] int, Dept_ID int, Status_ID int, Availability char(25)) declare @count int insert into @result ([User_ID], Dept_ID, Status_ID, Availability) select u.[User_ID], u.Dept_ID, s.Status_ID, t.[Name] as 'Availability' from Users u inner join Staff_Tracking s on u.[User_ID] = s.[User_ID] inner join Tracking_Status t on s.Status_ID = t.Status_ID where Account_Name = @accountName and s.Status_Time = (select max(s2.Status_Time) from Staff_Tracking s2 where s2.[User_ID] = u.[User_ID]) select @count = count(*) from @result if @count > 0 begin set @code = 1 select * from @result end else set @code = 0GO
it returns two resultsets and i don't know how to put the data into a recordset in asp. i would've thought that this would've done the job: dim dataConn, exist, username, cmdset dataConn = server.createobject("ADODB.Connection")set cmd = server.createobject("ADODB.Command")set rsUser = server.createobject("ADODB.Recordset")dataConn.Open "DSN=intranet;uid=intranet;pwd=bronty"username = Right(Request.ServerVariables("LOGON_USER"), Len(Request.ServerVariables("LOGON_USER")) - InStr(Request.ServerVariables("LOGON_USER"),"\"))with cmd.ActiveConnection = dataConn.CommandText = "User_Details".CommandType = adCmdStoredProc.Parameters.Append .CreateParameter("@username", adVarChar, adParamInput, 50, username).Parameters.Append .CreateParameter("@code", adInteger, adParamOutput, , 0)end withrsUser = cmd.Executebut it doesn't. i'm hoping one of you guys could show me the light. thanks heaps,bronson