try { foreach (DataGridViewRow row in dataGridView1.Rows) { foreach (DataGridViewCell cell in row.Cells) { value1 = row.Cells[0].Value.ToString(); value2 = row.Cells[1].Value.ToString(); cmd = new SqlCommand("insert into Classify2 (["+comboBox1.SelectedItem.ToString()+"],["+comboBox2.SelectedItem.ToString()+"]) values (@A,@B)", cn.con); cmd.Parameters.AddWithValue("@A", value1.ToString()); cmd.Parameters.AddWithValue("@B", value2.ToString()); cmd.ExecuteNonQuery(); cmd.Dispose(); //MessageBox.Show("Execute Process!!"); } } } catch (Exception error) { }
sp_rename
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)