Burak Karayel
Burak Karayel

Reputation: 31

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?

Upvotes: 2

Views: 171

Answers (1)

Ismail Anjrini
Ismail Anjrini

Reputation: 23

You can use the following steps to return the auto incremented key by using DBLookup:

  1. Query string:

    insert into Students(Name) values(?); 
    select SCOPE_IDENTITY() as ID
    
  2. Check "Results Enabled"

  3. Add new Result: (PropertyName: NewID, Column Id: ID)

I tried the same approach with DBReport, but it didn't work.

Upvotes: 0

Related Questions