cancel
Showing results for 
Search instead for 
Did you mean: 

UPDATE statement in Receiver JDBC adapter

Former Member
0 Kudos

Hi all,

I would like to use UPDATE statement in my receiver JDBC adapter and would like to know how this UPDATE statement works in following case.

1) If i have 10 records to be updated in database, whether Commit happens at the end of all 10 records updation OR it will be for every record update?

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

> 1) If i have 10 records to be updated in database, whether Commit happens at the end of all 10 records updation OR it will be for every record update?

This is depending on the scenario design

Source line items node map to STATEMENT in target side then in the Database line by line commit happens.

If Source line items node map to Access in target side then in the Database all the line items will commits at a time.

Regards,

Venkata Ramesh

Former Member
0 Kudos

Hi,

Then let me construct my query this way...

i have 10 records that needs to be updated to database, say For Ex: 7 records are updated successfully and 8th record has issue in updating the table.

In this case i would like to ROLLBACK entire 10 records with out committing any thing.

So if i use your 2nd option, it should perform as i expected right?

Regards

Former Member
0 Kudos

Hi,

That is Possible with Database Auto-Commit-enabling. In receiver comunication channel advanced tab we have an option Auto-Commit-enabling. once we enable that option all records are roll back.

regards,

ganesh.

Former Member
0 Kudos

AFAIK by default PI will do the transaction handling means in case of errors PI will rollback all the previous statement executed (for that particular message)...but in case if u choose "Database u2018Auto-Commitu2019 Enabled" then database will do the transaction handling...so suppose while updating the records (using stored procedures) if SP receives any exception then it won't rollback the previous executions

Former Member
0 Kudos

Hi,

> In this case i would like to ROLLBACK entire 10 records with out committing any thing.

> So if i use your 2nd option, it should perform as i expected right?

Yes. if you use this option then if any one of the record is having probelm when updating then all the records automatically got Rollback.

Regards,

Venkata Ramesh

Answers (0)