I am sorry for asking this offfline question but can't help it out..
Well i'm using the JDBC 2.0 API 's feature of BatchUpdate in my stateless
session bean i had to do a lot of updates to the database so thought of
using this New Feature introdudced in JDK1.2 . My code is same as described
in the Java Tutorial :
.....
.....
Statatement stmt = conn.createStatement();
conn.setAutoCommit(false);
while( expression)
{
String sqlquery = " ...........................Update
Query....................."; 1
System.out.println(sqlquery); 2
stmt.addBatch(sqlquery); 3
}
stmt.executeBatch();
The problem is that it prints the query perfectly fine but when the 3rd
expression is executed it throws an exception saying
null pointer exception ,Batch update only throws BatchUpdateException and
Sql Exception. Also the while loop runs fine if i comment the 3rd
expression..( i.e but obvious). I have also tried to print stmt , expression
and all other references just in case they are null but they are not.
Waiting for ur response.....
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".