Output params and Stored Procedure

djnet00

New Member
I've googled but none of the solutions seems to work for me! I have a SPROC in SQL Server which has an input param and also an output parameter being set within the SPROC.using classic ASP, I want to retrieve the value of that output parameter but nothing seems to get set (but I can see the output parameter working correctly when executing in the SQL Server Management Studio)\[code\]OpenConnectionSet cmdTemp = Server.CreateObject("ADODB.Command")cmdTemp.CommandType = 4 'adCmdStoredProcSet cmdTemp.ActiveConnection = dbConncmdTemp.CommandText = "GetCerts" cmdTemp.Parameters.RefreshcmdTemp.Parameters(1) = "ABC123"cmdTemp.Parameters(2).Direction = 2 'OutputSet reader = cmdTemp.ExecuteResponse.Write(cmdTemp.Parameters(2)) ' Nothing is displayed at all. CloseConnection\[/code\]I tried using the named parameters approach but always got an error saying that the parameters are out of range, wrong arguments or wrong type (Something similar to this).Really... getting a headache. I just want the OUTPUT param value set from the SPROC (2nd parameter in the SPROC)
 
Back
Top