Inserting Rows into Access

Hi,

I have done a search but i could not understand anything but:-

Statement s = con.createStatement();

s.execute("insert into BOOKS (BookID) values(1)");

But i have a lot of fileds in my db so i would prefer to use the result set to insert rows in to db. But i dont excatly know how to?

Can you please help me!!!

[350 byte] By [prakharbirlaa] at [2007-10-3 5:59:26]
# 1

>But i have a lot of fileds in my db so i would prefer to use the result set to insert rows in to db

For jdbc-odbc driver, you should use PreparedStatement to insert. You can try batch insert.

For commercial HXTT Access driver, you can use Bulk Insert A ResultSet from any JDBC driver at http://www.hxtt.com/access/advanced.html#insertresultset .

zhaoyha at 2007-7-15 0:41:06 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...