Both are being read in the page but they are both empty, I profiled the sproc call and tested it directly and the values are being returned correctly.
What could the problem be? quick note: in another server the same code works fine.
The code I'm using to get the values looks like (just the relevant part where parameters are set then when reading the values).
Expand|Select|Wrap|Line Numbers
- '... objects are declared, etc. command name is adoCommand
- '... objects are initialized (connetions strings, etc), and command type is adCmdStoredProc
- '... sproc parameters are created.
- adoParams.Append adoCommand.CreateParameter("@RETURN_VALUE", adInteger, adParamReturnValue, 4)
- adoParams.Append adoCommand.CreateParameter("@id", adInteger, adParamOutput, 4)
- adoParams.Append adoCommand.CreateParameter("@name", adVarchar, adParamInput, 100, Left(Name, 100))
- adoCommand.Execute
- '... next statement is alway true even when the return value (when tested directly in SQL) is 1
- If adoParams.Item("@RETURN_VALUE").Value <> 1 Then
- ' some code here
- End If
- '... next statement always return nothing even when the output parameter has a value (again, tested directly in sql)
- clientId = adoParams.Item("@id").Value