aspose file tools*
The moose likes JDBC and the fly likes java.sql.SQLException: General error; is occuring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: General error; is occuring" Watch "java.sql.SQLException: General error; is occuring" New topic

java.sql.SQLException: General error; is occuring

Huzefa Zohaib
Ranch Hand

Joined: Nov 21, 2001
Posts: 40
" java.sql.SQLException: General error " is occuring on the following code.
Please explain why and does it mean.

Jason Cox
Ranch Hand

Joined: Jan 21, 2004
Posts: 287
A "General Error" generally means there is something wrong with your SQL query. More than likely one of the values you are inserting doesn't match the SQL Data Type you are trying to insert it into. My guess would be the Messages column as the most likely culprit. Don't focus on that too much, it could be another problem with the statement, but definitely check your SQL query and make sure it can handle what you're trying to put into it.
You might also consider using pstmt.executeUpdate() as a best practice. Though I suppose it doesn't really matter if you're never doing anything with the return value of the execution.
I agree. Here's the link:
subject: java.sql.SQLException: General error; is occuring
Similar Threads
about hidden from fields
How I get byte[ ] from Object?
Convert an Object to ByteArray
Connection.prepareStatement is throwing "General Error Exception"
"Function sequence error!" what is it mean