Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
binding blob with picturebox
Florentin Izvoranu
May 13 2010 6:25 AM
5.8k
Reply
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
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
how to define two textbox with one label
Using classes to sanitaze code