I store "BYTE[]" type data into a BLOB. It stores it perfectly, the data being represented by hexadecimal pairs when I try to view it in MySQL. Now I want to convert that hexadecimal pairs into string. All the data is "simple" data such as strsing, intesger, floats, e the only thing that it is represented in hex. There is no complex data structures inside the BLOB.

What is the best way to do this?

Thank you

Recommended Answers

All 2 Replies

Unserealizing the BLOB byte data would be done in a program, probably just like you turned it into bytes in the first place.

I don't think there is a way of doing this directly in the database, and if so, we would like to know what type of database you are using.

Unserealizing the BLOB byte data would be done in a program, probably just like you turned it into bytes in the first place. I don't think there is a way of doing this directly in the database, and if so, we would like to know what type of database you are using.

Well, if it couldnt be done in the database, using MySQL Workbench, why when I right click and click "Open Value in Editor" it perfectly shows me the hexadecimal numbers? It would just need to get those hexadecimal numbers shown in a select, convert it using unhex and I would have a (huge) string with the in a human readable format data I want.

Just not sure how to do it.

Im using MySQL 5.6 if that was your question.

Thank you for the reply.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.