H
HightowerC
Hello all.
I have a problem, and it has got me stumped.
I've got a PreparedStatment defined as follows:
insertStmt = conn.prepareStatement(
"insert into document_filing ( " +
" case_id, " +
" event_id, " +
" path, " +
" pages," +
" last_updated_by, " +
" last_updated_datetime, " +
" last_updated_from) " +
"values (?, ?, ?, ?, ?, ?, ?)");
I then call the PreparedStatment.setXXX methods to set the values for
the various fields.
I have checked these against my database, and I am setting the fields
to the proper type (i.e.
I'm using setInt on an Integer field, and setString on a VARCHAR
field).
I run the insert query by the following statment:
rowsInserted = insertStmt.executeUpdate();
At this point, I sometimes (randomly it seems) get a
java.sql.SQLException: General Error
This "General Error" doesn't tell me much. I've googled, and the
responses usually say something like
"You're closing the connection or the preparedStatment before the
update." I can assure you that this is
not the case. The connection is open, the preparedStatment is created
properly, the values are set to the
proper type, none of the values are NULL, the data looks (almost)
exactly like data that gets passed through
this query and doesn't throw an exception.
Does anyone have any idea what might be causing this "General Error"?
My team and I are stuck.
I have a problem, and it has got me stumped.
I've got a PreparedStatment defined as follows:
insertStmt = conn.prepareStatement(
"insert into document_filing ( " +
" case_id, " +
" event_id, " +
" path, " +
" pages," +
" last_updated_by, " +
" last_updated_datetime, " +
" last_updated_from) " +
"values (?, ?, ?, ?, ?, ?, ?)");
I then call the PreparedStatment.setXXX methods to set the values for
the various fields.
I have checked these against my database, and I am setting the fields
to the proper type (i.e.
I'm using setInt on an Integer field, and setString on a VARCHAR
field).
I run the insert query by the following statment:
rowsInserted = insertStmt.executeUpdate();
At this point, I sometimes (randomly it seems) get a
java.sql.SQLException: General Error
This "General Error" doesn't tell me much. I've googled, and the
responses usually say something like
"You're closing the connection or the preparedStatment before the
update." I can assure you that this is
not the case. The connection is open, the preparedStatment is created
properly, the values are set to the
proper type, none of the values are NULL, the data looks (almost)
exactly like data that gets passed through
this query and doesn't throw an exception.
Does anyone have any idea what might be causing this "General Error"?
My team and I are stuck.