I am in search of an answer to the following problem:
I have a stored procedure that executes a series of other procedures.
create procedure PR_ABC
stored procedure PR_RST inserts data into table A and PR_XYZ inserts data
into table B etc.
I then call the main stored procedure PR_ABC using ADO command execute
method in my VB 6.5 application. I am interested in the return code from my
stored procedure (PR_ABC) to test whether it ran successfully.
Set Param1 = cmd.CreateParameter("RETURN_VALUE", adInteger,
cmd.execute , , adExecNoRecords
returnvalue = cmd.parameters("RETURN_VALUE")
The problem is I can't seem to get the proper return code using ADO command
when the stored procedure involves INSERTs, UPDATEs, OR DELETEs. The return
value is always 0 even when there is an error. It only seems to work for
SELECT statements (it only work if there is a resultset).
Is there a way I can get to the return value of stored procedure executing
inserts, updates, or deletes using ADO command ???
Suggestion are much appreciated.