Wrox Home  
Search P2P Archive for: Go

  Return to Index  

activex_data_objects thread: Getting IDENTITY field value by using Command Object from ADO


Message #1 by "Wesley Alves Machado" <machado_blackman@h...> on Sun, 5 Aug 2001 09:47:17 -0300
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


  Return to Index