TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Florentin Izvoranu
NA
3
0
binding blob with picturebox
May 13 2010 6:25 AM
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
Reply
Answers (
2
)
how to define two textbox with one label
Using classes to sanitaze code