Click here to Skip to main content
14,239,866 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi...
I am using Mysql work bench 5.1 version, convert image into bytes[] and insert into mysql table.
The problem is when i insert image into db, it showing error like..
"data too long for column 'IMAGE' at row 1"

Here image is column name and its data type is longblob(
in byteimg longblob(65534)
) in stored procedure.
Please help me, which data type is suitable for it?
Thank u.
Posted
Updated 9-Apr-14 2:28am
v2

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

   
Comments
Murali0195 9-Apr-14 8:30am
   
how to write? pls
sankarsan parida 9-Apr-14 8:39am
   
no don't write anything
Go to Database>Table>Right Click > Design > Change datatype to varbinary(max)
Murali0195 9-Apr-14 8:47am
   
Am used like that only, but it showing error like..
"ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'max))

BEGIN....." !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100