static void Main(string[] args)
{ int i = 3;
OleDbConnection thisconnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data source=qiqi.mdb");
OleDbDataAdapter thisadapter = new OleDbDataAdapter("select * from [#Class]", thisconnection);
OleDbCommandBuilder thisbuilder = new OleDbCommandBuilder(thisadapter);
DataSet thisdataset = new DataSet();
thisadapter.Fill(thisdataset, "class");
Console.Write("{0} -> {1} ", thisdataset.Tables["class"].Rows[i]["ClassName"], name);
thisdataset.Tables["class"].Rows[i]["ClassName"] = "妈妈,我爱你";
thisadapter.UpdateCommand =thisbuilder.GetUpdateCommand();
thisconnection.Close();
Console.ReadKey();
}
不好意思打错了。最后提示我UPdate语句语法错误。
可是书上都这么说的
{ int i = 3;
OleDbConnection thisconnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data source=qiqi.mdb");
OleDbDataAdapter thisadapter = new OleDbDataAdapter("select * from [#Class]", thisconnection);
OleDbCommandBuilder thisbuilder = new OleDbCommandBuilder(thisadapter);
DataSet thisdataset = new DataSet();
thisadapter.Fill(thisdataset, "class");
Console.Write("{0} -> {1} ", thisdataset.Tables["class"].Rows[i]["ClassName"], name);
thisdataset.Tables["class"].Rows[i]["ClassName"] = "妈妈,我爱你";
thisadapter.UpdateCommand =thisbuilder.GetUpdateCommand();
thisconnection.Close();
Console.ReadKey();
}
不好意思打错了。最后提示我UPdate语句语法错误。
可是书上都这么说的
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货