I can't seem to wrap my head around this. I'll need a seasoned programmer to push in the right direction. I have a listView with 7 sub items. What I'm looking to do is populate a table in an .mdb file with the data. The listView box is almost the same as the .mdb table I'm attempting to populate. It contains a static number of rows and about 10 columns (some of the columns will be populated with static data others with the dynamic data from the listview.
cnn.Open(); //Open database connection
foreach (ListViewItem toSenditems in this.listView1.Items)
{
//insert a new row in the table
for (int i = 0; i < toSenditems.SubItems.Count; i++)
{
//Fill the row with sub items
}
}
cnn.Close();
I can't figure out where in the loops to place my ExecuteNonQuerys and how to structure my sqlcommands.