1、两张格式相同以下代码运行B表中数据未更新
DataSet DSc = new DataSet();
mySQL.Open();
DSc = mySQL.GetDSet("select * from A", "A"); //DataSet调用
OleDbDataAdapter DSe = new OleDbDataAdapter("select * from B", mySQL.conn);
OleDbCommandBuilder my = new OleDbCommandBuilder(DSe);
DSe.Update(DSc, "A");
mySQL.Close();
2、如果两张表格式略有差异如何实现更新?
DataSet DSc = new DataSet();
mySQL.Open();
DSc = mySQL.GetDSet("select * from A", "A"); //DataSet调用
OleDbDataAdapter DSe = new OleDbDataAdapter("select * from B", mySQL.conn);
OleDbCommandBuilder my = new OleDbCommandBuilder(DSe);
DSe.Update(DSc, "A");
mySQL.Close();
2、如果两张表格式略有差异如何实现更新?
FOR UPDATE
AS
UPDATE B SET col1='',col2='' where B.id in (select id from inserted)
:- )-------------------
http://blog.cngator.com