Subject | PreparedStatemtn with jdbc 1.5 beta 3 drivers |
---|---|
Author | paulwnichols |
Post date | 2004-04-04T01:05:45Z |
Everytime I try running a PreparedStatement ps.executeUpdate(), I get
an error, but there is no information as to what the error is. Stack
Trace, core dump, reveals nothing nada. In my code, it simply hits
this line and then exits the entire code process, with no information,
nor explanation. Below is a sample:
public updateQuery(UsersDataBean usrs) throws SQLException {
String sql="Update table1 set LName=?,FName=?, Address=? Where "+
"ID=?";
try {
PreparedStatement ps=conn.prepareStatement(sql);
ps.setString(1,usrs.getLName());
ps.setString(2,usrs.getFName());
ps.setString(3,usrs.getAddress());
ps.setInt(4, usrs.getID());
ps.executeUpdate(); //blows up here
ps.close();
}
catch (SQLException sqlex) {
throw new SQLException("error in prepapred statement.
Reported exception was :"+ex.getMessage());
}
}
The Database is FB 1.5 final release version. The application is
running on Suse Linux 9.0. I do not have the same problems with mySQL
or Postgres.
Anyone know what is going on?
an error, but there is no information as to what the error is. Stack
Trace, core dump, reveals nothing nada. In my code, it simply hits
this line and then exits the entire code process, with no information,
nor explanation. Below is a sample:
public updateQuery(UsersDataBean usrs) throws SQLException {
String sql="Update table1 set LName=?,FName=?, Address=? Where "+
"ID=?";
try {
PreparedStatement ps=conn.prepareStatement(sql);
ps.setString(1,usrs.getLName());
ps.setString(2,usrs.getFName());
ps.setString(3,usrs.getAddress());
ps.setInt(4, usrs.getID());
ps.executeUpdate(); //blows up here
ps.close();
}
catch (SQLException sqlex) {
throw new SQLException("error in prepapred statement.
Reported exception was :"+ex.getMessage());
}
}
The Database is FB 1.5 final release version. The application is
running on Suse Linux 9.0. I do not have the same problems with mySQL
or Postgres.
Anyone know what is going on?