I can't display photo from heidiSQL in my datagridview. There is an error and I don't know how to cope with it because my source code is exactly the same as a person that I'm study with. Only difference is that he is using phpmyadmin.
Student student = new Student();
private void StudentsList_Load(object sender, EventArgs e)
{
// populate the datagridview with students data
MySqlCommand command = new MySqlCommand("SELECT * FROM `students`");
dataGridView1.ReadOnly = true;
DataGridViewImageColumn picCol = new DataGridViewImageColumn();
dataGridView1.RowTemplate.Height = 80;
dataGridView1.DataSource = student.getStudents(command);
picCol = (DataGridViewImageColumn)dataGridView1.Columns[7];
picCol.ImageLayout = DataGridViewImageCellLayout.Stretch;
dataGridView1.AllowUserToAddRows = false;
}
https://i.stack.imgur.com/Kilx0.png Error I get