日期:2014-05-17 浏览次数:21023 次
public void DwmcToDjbh2()
{
OleDbConnection mycon = null;
try
{
string strcon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\1.mdb;";
mycon = new OleDbConnection(strcon);
mycon.Open();
string sql = "update djbh2,dwmc set djbh2.单位名称 = dwmc.单位名称 where djbh2.单据编号 = dwmc.单位名称";
OleDbDataAdapter ad = new OleDbDataAdapter(sql, strcon);
DataTable dt = new DataTable();
ad.Fill(dt);
}
finally
{
mycon.Close();
}
}