G
Guest
Hi all,
I'm having problems returning an OUTPUT parameter from a
stored procedure in ADP. I want to insert a record in a
table an return the Identity using @@IDENTITY function.
The stored procedure is OK...working from QA. However,
from Access I can't retrive anything.
Below is the code I'm using from Access
*****************************************************
Set cmd = New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandText = "sp_Insert"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Refresh
cmd.Parameters("ParamIn1") = varParamIn1
cmd.Parameters("ParamIn2") = varParamIn2
cmd.Parameters("ParamIn3") = varParamIn3
cmd.Execute
MsgBox (cmd.Parameters("ParmOut").Value)
..
I'm having problems returning an OUTPUT parameter from a
stored procedure in ADP. I want to insert a record in a
table an return the Identity using @@IDENTITY function.
The stored procedure is OK...working from QA. However,
from Access I can't retrive anything.
Below is the code I'm using from Access
*****************************************************
Set cmd = New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandText = "sp_Insert"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Refresh
cmd.Parameters("ParamIn1") = varParamIn1
cmd.Parameters("ParamIn2") = varParamIn2
cmd.Parameters("ParamIn3") = varParamIn3
cmd.Execute
MsgBox (cmd.Parameters("ParmOut").Value)
..