Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

long numbers instead of data

Status
Not open for further replies.

garyd1234

Programmer
Sep 11, 2003
3
US
Hi,
I am trying to use blobs in a mysql database. i have a servlet that will use a sql select statement to pull back data. Then I use a while rs.next() and getString each field into its own variable. It seems that short fields come back as they should be. The blob data field comes back as a very long number instead of formatted data. It seems to be a very long hex number. Could it be that, because there are soft carriage returns and indents (tabs) in the data this could be messing it up? The data was cut from a text document and pasted into Access. Then I wrote a VB program to write the data to the mysql table. If I use mysql editor to write a select statement, the data comes back looking like it is suppose to. But when my java program tries to read it back is where i get the long number. Hope this helps. Thanks.
Gary
 
Got bored with this thread ? thread269-921206

You are using ResultSet.getString() on a BLOB ? This will cause horrendous problems. You want to use the ResultSet.getBlob() method instead.

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top