Hi,
I'm a beginer in c sharp and I can't pass over a problem. I would like
to bind a blob field (mysql) with a picturebox in c sharp;
here is the code:
- string query = "Select name,director,picture from Movies where Movies.name='" + search + "'";
-
//create command and assign the query and connection from the constructor
-
MySqlCommand cmd = new MySqlCommand(query, connection);
-
-
//Execute command
-
MySqlDataReader dr;
-
-
dr = cmd.ExecuteReader();
-
if (dr.HasRows)
-
{
-
while (dr.Read())
-
{
-
txtname.Text = (dr["Name"] + "");
-
txtdirector.Text = (dr["Director"] + "");
-
txtactors.Text = (dr["Actors"] + " "");
-
}
-
}
-
else
-
MessageBox.Show("The movie is unavailable");
What shall I do to extract the picture form database and put it in a
picturebox
like I put the other fields in textbox ? If anybody know, I would like an exact answer not a link,
because I use mysql not sql and because I already done a lot of searching on this topic bu
without succes.
thank you in advance