'WSO2 Micro Integrator - DBReport Mediator Return Generated Keys
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?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jeremy Caney |