Change your database definition!
Look at making the "i1" field a BLOB, MEDIUMBLOB or LONGBLOB depending on the size of the image data.
Plus, do us all a favour: USE SENSIBLE NAMES!
"p" is not a good table name.
"ee" is not a good field, nor is "i1".
What do these names say about the data they contain? Nothing.
What do these names say about the database designer? That he is an inexperienced idiot...
In addition, have a look at the mySQLCommand.AddWithValue method - it will make your code a lot cleaner. Well done, BTW, for using parametrised queries - most beginners miss that. OriginalGriff[/edit]