Inserting an array of byte[ ] in a database

Hi,

In my program I have to insert a bynary data in my database. To do that, I created in the database a column, called "data", and I set the type of the column to MEDIUMBLOB. I receive the data that I have to store from a serial port, so they are stored in a byte[ ] array. How can I give that array to my database?

[329 byte] By [IronBargiaa] at [2007-11-26 22:23:17]
# 1
You can instead convert them to String and save them as VarChar or Text and then den them back as string and reconvert them to byte[]
despinaa at 2007-7-10 11:22:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Search for how to store and retrieve blobs via JDBC.
jschella at 2007-7-10 11:22:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
> You can instead convert them to String and save them> as VarChar or Text and then den them back as string> and reconvert them to byte[]Ewww....And what if the bytes don't correspond with character data?
bckrispia at 2007-7-10 11:22:30 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...