Sridhar Santhanakrishnan wrote:Giving more details about the exception would be helpful.
One more idea would be to add the queries into a batch using addBatch() and then use executeBatch once all the rows have been added.
Sridhar Santhanakrishnan wrote:Giving more details about the exception would be helpful.
One more idea would be to add the queries into a batch using addBatch() and then use executeBatch once all the rows have been added.
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jeanne Boyarsky wrote:Can you show the code for addBatch() ?
Bauke Scholtz wrote:Stop using the ODBC bridge driver.
Use the JDBC driver which comes along with the RDBMS in question.
Bauke Scholtz wrote:Oh, more trouble, you're using MS Access. This isn't a real RDBMS. You're using the worst of the both worlds (MS Access with ODBC).
If you can, please immediately drop it and replace it by a real RDBMS, such as MySQL, PostgreSQL, etc. If you're looking for a portable database, then look for an embedded RDBMS in Java. Examples are JavaDB (included since JDK6), Derby (its predecesor) or Hypersonic.
If you're ultimately sticked to MS Access, then live with the fact that you can't use the full RDBMS capabilities out of this. Whenever you got this kind of problems, accept it as a limitation of MS Access. Instead of effectively reusing PreparedStatement in a loop, you should ineffectively redo the complete job (connect, preparestatement, execute, commit, close) for every row. This will work for MS Access.
Deeps Mistry wrote:
I am developing this application at home. Hence the decision to use MS Access. Can i download any of the real RDBMS for free? ( )
Bauke Scholtz wrote:
Deeps Mistry wrote:
I am developing this application at home. Hence the decision to use MS Access. Can i download any of the real RDBMS for free? ( )
Just visit their homepage for the product details and you'll quickly see if it's free or not?
At least the aforementioned RDBMS's are just free.
Bauke Scholtz wrote:
Deeps Mistry wrote:
I am developing this application at home. Hence the decision to use MS Access. Can i download any of the real RDBMS for free? ( )
Just visit their homepage for the product details and you'll quickly see if it's free or not?
At least the aforementioned RDBMS's are just free.