try { SqlConnection con = new SqlConnection(constr); con.Open(); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.SelectCommand = new SqlCommand("SELECT * FROM trips", con); SqlCommandBuilder builder = new SqlCommandBuilder(adapter); adapter.Fill(dt); adapter.Update(dt); MessageBox.Show("Changes Saved", "Updating...", MessageBoxButtons.OK, MessageBoxIcon.Information); con.Close(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { lblCount.Text = "Total Records Displayed: " + dgvTrips.Rows.Count.ToString(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)