I have a datagridview which is created by various action and user\'s manipulation of data. I want to insert all the data of the gridview to the database at once, I know I co
You have a syntax error Please try the following syntax as given below:
string StrQuery="INSERT INTO tableName VALUES ('" + dataGridView1.Rows[i].Cells[0].Value + "',' " + dataGridView1.Rows[i].Cells[1].Value + "', '" + dataGridView1.Rows[i].Cells[2].Value + "', '" + dataGridView1.Rows[i].Cells[3].Value + "',' " + dataGridView1.Rows[i].Cells[4].Value + "')";