MySQL Forums
Forum List  »  Knowledge Base

java.sql.SQLException: Data Type Mismatch with CachedRowSet.getBytes()
Posted by: xchz xchz
Date: December 10, 2008 02:08AM

I upgrade my table from version mysql-4.0.2 to version mysql-5.0.67 and JDBC connector is mysql-connector-java-5.0.8, but my old application program have something like this
byte[] dbProjectContent = cachedRowSet.getBytes(1);

my first column has type: projectcontent text

When I read this column with getBytes (), I got SQLException
javax.servlet.ServletException: Data Type Mismatch

I use cachedRowSet.getMetaData().getColumnTypeName(1)), I got VARCHAR.

How can I suit my old application program with new version of mysql.

Options: ReplyQuote


Subject
Views
Written By
Posted
java.sql.SQLException: Data Type Mismatch with CachedRowSet.getBytes()
5195
December 10, 2008 02:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.