Fraser_Admin
asked on
BLL DAL ObjectDataSource InsertMethod
I am using a stored procedure to insert into my table from my DAL.
The stored procedure ends with return @@scope_identity
I now want to access that in my BLL so I can return it back to the objectdatasource inserted event and then use it on my page.
retval = Adapter.Update(mytable)
always returns the records affected (which is 1). how do i get this value?
The stored procedure ends with return @@scope_identity
I now want to access that in my BLL so I can return it back to the objectdatasource inserted event and then use it on my page.
retval = Adapter.Update(mytable)
always returns the records affected (which is 1). how do i get this value?
SET @Identity = SCOPE_IDENTITY()
return @Identity
return @Identity
ASKER
apexpert, as I mentioned in my original question I am ending the sp with return SCOPE_IDENTITY()
ASKER
the example you gave is an ADO.NET example. I'm looking for an example for BLL/DAL.
Return scope_identitty from the sp then receive this value in my BLL to return to my objectdatasource inserted event.
Return scope_identitty from the sp then receive this value in my BLL to return to my objectdatasource inserted event.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://msdn.microsoft.com/en-us/library/ks9f57t0(VS.80).aspx