cancel
Showing results for 
Search instead for 
Did you mean: 

Commit after issuing many INSERT statements with JDBC adapter

Former Member
0 Kudos

I would like to be able to issue many INSERT statements with the JDBC adapter using the format


<StatementName2>
   <dbTableName action=u201DINSERTu201D>
      <table>realDbTableName</table>
      <access>
         <col1>val1</col1>
         <col2>val2</col2>
      </access>
   </dbTableName>
</StatementName2>

Then commit all of the records at the same time.

IS it possible to do this, either using the format above, or using the action = "SQL_DML" form instead?

What do I have to do to explicitly force the commit? Can I explicitly use the COMMIT command in the SQL_DML form? And if I can use the action = "INSERT" form, how can I then control the commit so it is done after many records have been inserted?

BR,

Tony.

Accepted Solutions (0)

Answers (3)

Answers (3)

prateek
Active Contributor
0 Kudos

If you have all these Insert statements with multiple <access> tags, then it would create a single Commit for all the access tags.

Regards,

Prateek

Former Member
0 Kudos

Hi,

I think you can use the database auto commit in advance mode of Communication Channel configuration.

Regards,

venu V

Former Member
0 Kudos

Hello,

You can have multiple INSERT blocks in the same payload.

It is executed as single LUW. If all is success COMMIT is executed else ROLLBACK for entire thing occurs.

Try it, it should work.

Regards,

Vikas