| Author |
put Data from Vector into DB.
|
tom1978
Greenhorn
Joined: Sep 08, 2002
Posts: 7
|
|
Hi, for my current application i want to add Data to a Database. This data is stored in a Vector. Does anyone have an idea, how to do with (eg. loop). I would be very happy about a code sample. Greetings tom
|
 |
tom1978
Greenhorn
Joined: Sep 08, 2002
Posts: 7
|
|
|
Vector or Object[][] ( is as well possible)
|
 |
Chandresh Patel
Greenhorn
Joined: Jul 05, 2002
Posts: 14
|
|
|
You can use Batch Inserts.
|
Chandresh
|
 |
Bill White
Ranch Hand
Joined: Oct 27, 2002
Posts: 82
|
|
// Create Connection and Statement object Iterator iter = myVector.iterator(); while(iter.hasNext()) { myObject = (MyObject)iter.next(); String sql = "whatever type of sql you need"; statement.addBatch(sql); } statement.executeBatch();
|
 |
 |
|
|
subject: put Data from Vector into DB.
|
|
|