Image img =fromcomputer.Image;
byte[] arr;
ImageConverter converter = new ImageConverter();
arr = (byte[])converter.ConvertTo(img, typeof(byte[]));
string uploadpic = "insert into mypic(Data) values('" + arr + "'," + "@Image)";
MySqlExtended.dbaccess.f_exec_string(uploadpic, connString);
MySqlConnection conn = new MySqlConnection(connString);
MySqlCommand command = conn.CreateCommand();
command.Parameters.Add(new MySqlParameter("@Image", fromcomputer));
Asked
Active
Viewed 31 times
0

Yeldar Kurmangaliyev
- 33,467
- 12
- 59
- 101

TheNewbie
- 1
- 1
-
http://stackoverflow.com/questions/37525189/saving-image-in-sql-data-base-how/37525417#37525417 check for my answer. It might help you. – Akshay Jun 17 '16 at 10:26
-
What is the dataType specified for your image column in the database? And what exception are you getting? – Oluwafemi Jun 17 '16 at 10:30
-
Tyvm to take time to answer my question but it's ok i found how to do it ! – TheNewbie Jun 20 '16 at 06:22