What is the correct syntax for returning an output value from a stored procedure? I have tried the following without success...the name of my output parameter is 'EmailAddress' in the stored proc. Can anybody help me out?
dim ObjConnGetManagerEmail,ObjCommGetManagerEmail,ObjRsetGetManagerEmail
set ObjConnGetManagerEmail = server.CreateObject("ADODB.connection")
set ObjRsetGetManagerEmail = server.CreateObject("ADODB.Recordset")
Set ObjCommGetManagerEmail = server.CreateObject("ADODB.Command")
ObjConnGetManagerEmail.Open strConn
ObjCommGetManagerEmail.ActiveConnection = ObjConnGetManagerEmail
ObjCommGetManagerEmail.CommandType = 4
ObjCommGetManagerEmail.CommandText = "GetManagerEmailAddress"
ObjCommGetManagerEmail.Parameters.Refresh
ObjCommGetManagerEmail.Parameters(1).Value = Session("LoginID")
ObjCommGetManagerEmail.Parameters(2).Direction = adParamOutput
dim EmailAddress = ObjCommGetManagerEmail.Parameters(2).Value
ObjCommGetManagerEmail.Execute
set ObjCommGetManagerEmail = nothing
set ObjConnGetManagerEmail = nothing
dim ObjConnGetManagerEmail,ObjCommGetManagerEmail,ObjRsetGetManagerEmail
set ObjConnGetManagerEmail = server.CreateObject("ADODB.connection")
set ObjRsetGetManagerEmail = server.CreateObject("ADODB.Recordset")
Set ObjCommGetManagerEmail = server.CreateObject("ADODB.Command")
ObjConnGetManagerEmail.Open strConn
ObjCommGetManagerEmail.ActiveConnection = ObjConnGetManagerEmail
ObjCommGetManagerEmail.CommandType = 4
ObjCommGetManagerEmail.CommandText = "GetManagerEmailAddress"
ObjCommGetManagerEmail.Parameters.Refresh
ObjCommGetManagerEmail.Parameters(1).Value = Session("LoginID")
ObjCommGetManagerEmail.Parameters(2).Direction = adParamOutput
dim EmailAddress = ObjCommGetManagerEmail.Parameters(2).Value
ObjCommGetManagerEmail.Execute
set ObjCommGetManagerEmail = nothing
set ObjConnGetManagerEmail = nothing