Re: NullPointerException while excuting executeBatch
Posted by: tr1gun
Date: January 30, 2005 09:56AM

Hi,

sorry i forgot
Using MySQL 4.1 and the version of the driver is 3.1.5 (gamma)
I had the same problem with a previous version of the driver but don't remember the version number anymore.
I create a connection with following the code:
Class.forName("com.mysql.jdbc.Driver").newInstance();
mysql = DriverManager.getConnection("jdbc:mysql://" + HOST + ":" + PORT + "/" + DATABASE + "?user=" + USER + "&password=" + PASS);

For updating the db i call it with:
Statement stmt = mysql.createStatement();
stmt.addBatch (Some sql statements);
stmt.executeBatch();

Hope this helps :)

Options: ReplyQuote


Subject
Written By
Posted
Re: NullPointerException while excuting executeBatch
January 30, 2005 09:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.