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
Saudie Esmail
NA
13
7.2k
Listview with database.
Aug 7 2014 9:57 PM
:(
how can save the items in listview?? I tried this
private void btnSave_Click(object sender, EventArgs e)
{
try
{
con.Close();
con.Open();
foreach (ListViewItem Itm in listView1.Items)
cmd = new MySqlCommand("INSERT into sched_tbl (Day,Coursecode,Time,room)" + " VALUE('" + Itm.SubItems[0].Text + "','" + Itm.SubItems[1].Text + "','" + Itm.SubItems[2].Text + "','" + Itm.SubItems[3].Text + "')", con);
dt = cmd.ExecuteReader();
con.Close();
MessageBox.Show("good");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
con.Close();
}
It work but my problems is only the first item is saved in my database..
I need help.. thanks :(
Reply
Answers (
2
)
how to select date of birth from database to gridview
ERROR