activex_data_objects thread: Getting IDENTITY field value by using Command Object from ADO
Does anyone know how can I getting the identity value when using Command
Object from ADO (obviously with Insert or Update CommandText)?
I've trying this:
Creating a parameter to store the output parameter declared on stored pro
cedure-it doesn't work.
Following the Wrox Book (ado 2.0):
objCmd.CommandText = "StoredProcName"
objCmd.CommandType=4
objCmd.Parameters.Append objCmd.CreateParameter("returnValue", adInteger,
adParameterReturnValue)
Set oRs = objCmd.Execute
oRs.Close
intValueOutput = objCmd.Parameters("returnValue")
Also, this doesn't Work.
While this help doesn't arrive, I'm using the "ADDNEW' method...
Regards,
Wesley Machado