Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Adding BLOBS to mysql database using java

  • 03-03-2004 07:16PM
    #1
    Closed Accounts Posts: 364 ✭✭


    Hi

    I was wonderind can anyone help me with inserting BLOBS to a MySQL database using java. I have an object that I have serialized, and I want to convert that to a byte array. I would then like to transfer that byte array to the SQL server and store it there as the MySQL BLOB datatype.

    Is blob the right thing to use? And how would one go about doing this? I have searched the internet for help on this, and I have had no lucck so far.

    Thanks for any help.


Comments

  • Closed Accounts Posts: 19 stuyg


    why not use filebaths? ITS A LOT EASIER!!!!
    store the filepath of the imageas a "varchar" or "string" and get ur prog to grab the image from the file!


  • Closed Accounts Posts: 364 ✭✭Matfinn


    Im trying to store an object that has been serialized. I have an object that I must transfer to an array of bytes, and then I want to store them bytes as a BLOB in the mysql database.


Advertisement
Advertisement