Results 1 to 1 of 1
- 04-22-2008, 11:57 AM #1
Member
- Join Date
- Apr 2008
- Posts
- 1
- Rep Power
- 0
problems about storing binary data to mysql db using PreparedStatement
I've found that storing binary data (byte[]) has the following problem if using PreparedStatement.setBinaryStream or setBytes.
if any element of the array is bigger than 127, the byte with value 0 after this element will be changed to 2 bytes "\0", or "92 48" in ordinal value automatically, thus when I read the array from mysql database, it is invalid. How could I GET WHAT I ACTUALLY STORE? 3x.
Similar Threads
-
Storing data permanently
By shaungoater in forum New To JavaReplies: 2Last Post: 03-10-2008, 04:18 PM -
Modifying data in database table using PreparedStatement
By Java Tip in forum Java TipReplies: 0Last Post: 02-09-2008, 08:22 PM -
how to call data from MySQL
By rhlpnt in forum Java ServletReplies: 0Last Post: 02-02-2008, 11:03 AM -
Reading Binary File and Changing data
By janakiram.attuluri in forum Advanced JavaReplies: 1Last Post: 12-21-2007, 10:10 AM -
Storing Data
By Khorod in forum New To JavaReplies: 1Last Post: 08-03-2007, 05:48 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks