回覆列表
  • 1 # 啊三

    SqlDataAdapter adapter = new SqlDataAdapter(strSql, strConn); SqlCommandBuilder builder = new SqlCommandBuilder(adapter); DataSet ds = new DataSet(); adapter.Fill(ds, "Titles"); //插入記錄 DataTable table = ds.Tables["Titles"]; DataRow row = table.NewRow(); row["Title_id"] = "JP1001"; row["title"] = "programming Microsoft .NET"; row["price"] = 59.99m; row["ytd_sales"] = 100000; row["type"] = "business"; row["pubdate"] = new DateTime(2002, 5, 1); table.Rows.Add(row); //更新資料庫 adapter.Update(table);

  • 中秋節和大豐收的關聯?
  • 混幹皮有啥粉底推薦嗎?