returnValue parameter ?

  • Thread starter Thread starter Will
  • Start date Start date
W

Will

I am executing a stored proc that does an insert and then
returns the new ID. I create all my command parameters and
then objCommand.ExecuteNonQuery();

how do I retrieve the new ID? do I create a returnValue
parameter as well before I execute? if so what would the
syntax be? please help, thanks.


Will
 
Again see http://www.betav.com/msdn_magazine.htm to see how to handle return
values.
Basically, you create a Parameter with ReturnValue as the direction and
capture this value after the rowset has been retrieved (if any).

--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top