SqlConnection con = new SqlConnection(connStr); DataSet ds = new DataSet(); DataRow dr; SqlCommand cmd = new SqlCommand("select * from address",con); SqlDataAdapter da = new SqlDataAdapter(cmd); SqlCommandBuilder cmdBuilder; da.FillSchema (ds,SchemaType.Source ); da.Fill(ds, "address"); dr = ds.Tables["address"].NewRow(); dr["sname"] = "tomy"; dr["fname"] = "peter"; ds.Tables["address"].Rows.Add(dr); cmdBuilder = new SqlCommandBuilder(da); da.Update(ds, "address");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)