Click here to Skip to main content
15,896,408 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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..
C#
"data too long for column 'IMAGE' at row 1"

Here image is column name and its data type is longblob(
C#
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

 
Share this answer
 
Comments
[no name] 9-Apr-14 8:30am    
how to write? pls
[no name] 9-Apr-14 8:39am    
no don't write anything
Go to Database>Table>Right Click > Design > Change datatype to varbinary(max)
[no name] 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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900