SqlHelper/Typed Params/@@Identity
Hi everybody,
I'm working with SqlHelper and strong-typed datasets, updating my data by means of passing in a typed datarow into the ExecuteNonQueryTypedParams function. I now need to be able to retrieve the @@Identity from the stored procedure- How could I go about this? It seems that by passing in a datarow I don't have room to play with output parameters or the like. Stumped. Thanks...
-Yarin
Re: SqlHelper/Typed Params/@@Identity
Are you using a stored proc ? if so, then just return the @@Identity in your stored proc and use
ExecuteScalar
instead.