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
JONAS BOATENG
NA
24
0
Update mysql tables in C#
Oct 29 2009 8:39 AM
Hi, yall. Am trying to update mysql table called exemptions with texts in textboxes (txt......)but when i go back to the table, no changes is made in the table. below is the code.
[code]
private void btnUpdate_Click(object sender, EventArgs e)
{
MySqlConnection mycon = new MySqlConnection("datasource=localhost;username=root;database=church");
MySqlCommand updatecom = new MySqlCommand("Update exemptions set exemptions = '" + txtexempt.Text + "',exempt1='"
+ txtexempt1.Text + "',exempt2='" + txtexempt.Text + "' where ID ='" + txtmeid.Text + "'", mycon);
mycon.Open();
updatecom.ExecuteNonQuery();
mycon.Close();
MessageBox.Show("Member Id " + txtmeSname.Text + " has sucessfully been updated");
this.reset();
}
[/code]
Please someone tell me what to do
Reply
Answers (
2
)
password change rights
tabcontrol event fired automatically