S
SharpChen
Unregistered / Unconfirmed
GUEST, unregistred user!
如题
以下是执行的相关代码,请大侠们帮忙看一下有什么问题吗?小弟谢谢了
private void Insert_Click(object sender, System.EventArgs e)
{
DataTable myDataTable = myDataSet.Tables["Customers"];
DataRow myDataRow = myDataTable .NewRow();
myDataRow["CustomerID"] = "T1COM";
myDataRow["CompanyName"] = "T1 Company";
myDataRow["ContactName"] = "Jason Price";
myDataRow["Address"] = "1 Main Street";
myDataTable.Rows.Add(myDataRow);
myDataTable.AcceptChanges();
SqlCommandBuilder objCommandBuilder = new SqlCommandBuilder(mySqlDataAdapter);
mySqlDataAdapter.Update(myDataSet,"Customers");
mySqlDataAdapter.Fill(myDataSet,"Customers");
}
以下是执行的相关代码,请大侠们帮忙看一下有什么问题吗?小弟谢谢了
private void Insert_Click(object sender, System.EventArgs e)
{
DataTable myDataTable = myDataSet.Tables["Customers"];
DataRow myDataRow = myDataTable .NewRow();
myDataRow["CustomerID"] = "T1COM";
myDataRow["CompanyName"] = "T1 Company";
myDataRow["ContactName"] = "Jason Price";
myDataRow["Address"] = "1 Main Street";
myDataTable.Rows.Add(myDataRow);
myDataTable.AcceptChanges();
SqlCommandBuilder objCommandBuilder = new SqlCommandBuilder(mySqlDataAdapter);
mySqlDataAdapter.Update(myDataSet,"Customers");
mySqlDataAdapter.Fill(myDataSet,"Customers");
}