R
Rod Behr
An SQL stored procedure returns 0 if it completes correctly and a negative
number to reflect an error.
When calling a stored procedure from Access, how do you capture this return
integer in order to capture whether the called stored procedure has succeeded?
My VB syntax would be:
Set cn = New ADODB.Connection
cn.ConnectionString =
"DSN=TheFactory;DATABASE=TheFactory;Uid=Factory;Pwd=1mpact"
cn.Open
Set cmd = New ADODB.Command
cmd.ActiveConnection = cn
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "proc_name"
intReturnValue = cmd.Execute
cn.Close
This is all lovely, but I cannot then manipulate/use intReturnValue. It
should be an integer, but it isn't. I cannot execute a print.debug
intReturnValue as this returns error "Wrong number of arguments or invalid
property assignment".
How do I capture return codes from a SQL Stored Procedure?
number to reflect an error.
When calling a stored procedure from Access, how do you capture this return
integer in order to capture whether the called stored procedure has succeeded?
My VB syntax would be:
Set cn = New ADODB.Connection
cn.ConnectionString =
"DSN=TheFactory;DATABASE=TheFactory;Uid=Factory;Pwd=1mpact"
cn.Open
Set cmd = New ADODB.Command
cmd.ActiveConnection = cn
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "proc_name"
intReturnValue = cmd.Execute
cn.Close
This is all lovely, but I cannot then manipulate/use intReturnValue. It
should be an integer, but it isn't. I cannot execute a print.debug
intReturnValue as this returns error "Wrong number of arguments or invalid
property assignment".
How do I capture return codes from a SQL Stored Procedure?