I have a table in Oracle with BLOB data. When I try to retrieve the data using
ResultSet rs=st.executeQuery("SELECT * from NodeTable");
It gives an exception. If I put only the non BLOB column name in the SQL statement, there is no error. But if I put the BLOB column name, it gives the same error as above.
The stack trace is as below:
java.sql.SQLException: General error
That would be because the JDBC-ODBC driver doesn't support BLOB columns. But you're using an Oracle database, right? Then why not use the Oracle JDBC driver which goes with it? That driver would surely support BLOBs.
Also retrieving a blob takes special handling. Here is some example code I have used, there are probably many examples out there if you want to Google them. And Paul is right, you want to use the Oracle JDBC Driver if your application is always going to use Oracle.
subject: Problem retrieving BLOB through resultset