Hi,
I have table which contains the fields "org_name,org_address,city,country,phone,logo".Here logo is the columns which datatype is longblob.Initially I insert the data without logo column.Now i want to insert an image in the field "logo".How I insert image file in existing table record?can u help me guys?
Loading

Iftikar HussainPosted Jun 25, 2013, 11:23 AM
You need to first convert the files data to byte array.
var bytes = File.ReadAllBytes(pathToFile)
Regards,
Iftikar
Kavi sujaPosted Jun 25, 2013, 9:32 AM
I correct this task by referring the following link:
http://stackoverflow.com/questions/8439202/upload-image-directly-through-mysql-command-line
Kavi sujaPosted Jun 25, 2013, 8:46 AM
Thank you for your reply.But actully I'm asking query for insert image from local system in to MySQL Table.in update query I use this "Update organizationdetails set LOGO= 'C:\Documents and Settings\Administrator\Desktop\Fortis.JPEG' where organization_id = 1;" But,the image can't save in DB.Can you give me any ideas?
Iftikar HussainPosted Jun 25, 2013, 8:36 AM
Since you are trying to insert image for existing records, then you need execute update query as shown below
Regards,
Iftikar
Remember to click "Mark as Answer" on the post, if it helps you.