SqlConnection conn = new SqlConnection("database=myDB;data source=(local); integrated security=true"); conn.Open(); SqlDataAdapter da = new SqlDataAdapter("select * from Book", conn); DataSet ds = new DataSet(); da.Fill(ds, "Book"); DataTable dt = ds.Tables["Book"]; DataRow dr = dt.NewRow(); dr["bookName"] = "C#.NET"; dr["bookISBN"] = "FW-593"; //Primary Key dr["bookPrice"] = "15000"; dr["bookPubDate"] = "1392/1/9"; dt.Rows.Add(dt); SqlCommandBuilder cb = new SqlCommandBuilder(da); da.Update(ds,"book");
dt.Rows.Add(dt);
dt.Rows.Add(dr);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)