Wednesday, February 17, 2010

[Java] JDBC executeBatch() method

 

Hi all,
Statement stmt = con.createStatement();stmt.addBatch("insert into
first(...)");stmt.addBatch("insert into
second(...)");stmt.addBatch("insert into third(...)");
stmt.executeBatch();
I am using above code to insert data into 3 tables at a time.
When i call stmt.executeBatch(); method,Can any one tell me, whether 3
requests (calls) will go to database to insert data into tables or with
single request (call) data will insert into 3 tables?
Note: my application is in my system and database is at remote location.

[Non-text portions of this message have been removed]

__._,_.___
Visit http://aiaiai.com or http://jgame.org for more groups to join.
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
.

__,_._,___

No comments:

Post a Comment