Skip to Content
author's profile photo Former Member
Former Member

JDBC commit order

Hello, sdners! I have a doubt about JDBC Adapter. If I have an insert statement like following, how many commits will be executed? 1, 2 or 3? And when will it be executed?

<StatementName2>

<dbTableName action=u201DINSERTu201D>

<table>realDbTableName</table>

<access>

<col1>val1</col1>

<col2>val2</col2>

</access>

<access>

<col1>val11</col1>

</access>

</dbTableName>

</StatementName2>

<StatementName2>

<dbTableName action=u201DINSERTu201D>

<table>realDbTableName</table>

<access>

<col1>val1</col1>

<col2>val2</col2>

</access>

</dbTableName>

</StatementName2>

Thanks in advance!

Regards

Federico

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Sep 10, 2010 at 02:54 PM

    Hi Fede,

    You'll have one commit for every "statement", in your case, 2 commits.. one for each Insert.

    Regards,

    Juan.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 10, 2010 at 03:18 PM

    Fede,

    you will have one commit per statements coz each statements corresponde to two differents SQL statements, in this case two inserts. similar case if you instead of execute an SQL Statement you call an statatement that execute an SP and another statement that execute an SQL Statemtent, you have two stataments no matter which action each one execute you have two commits

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.