Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Blob to string in MySQL

843854Aug 21 2003 — edited Nov 20 2014
OK, sorry for the stupid question but this is my first exposure to blobs and I don't quite understand what is happing here or how to handle it.

I changed a table column in MySQL from VARCHAR to BLOB b/c I need more than 255 characters...I need more like a max of 500 (it used to work fine before this). If there's something better to use than blob, please let me know.

Clearly my text is stored there but I guess it's in Hex format? I can go to the command line and type "SELECT text from tablename" and get readable text strings so I know the data exists. However, I am doing a rs.getString("blobcolumnname");
to retrieve the string from the DB...clearly this is wrong b/c I get nothing but a long string of numbers. How can I get readable text from this?

thanks in advance,

Chuck
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2008
Added on Aug 21 2003
3 comments
708 views