Reputation: 31
By using DBReport mediator I executed insert function to my database table. After successful insert operation is it possible to return the auto incremented key value of the record?
Upvotes: 2
Views: 171
Reputation: 23
You can use the following steps to return the auto incremented key by using DBLookup
:
Query string:
insert into Students(Name) values(?);
select SCOPE_IDENTITY() as ID
Check "Results Enabled"
Add new Result: (PropertyName: NewID, Column Id: ID)
I tried the same approach with DBReport
, but it didn't work.
Upvotes: 0