日期:2014-05-17 浏览次数:20886 次
public void tempDesc()
{
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 = "SELECT ID,单位编码,单位名称,单据编号 FROM temp ORDER BY 4 ASC";
//string sql = "insert into temp select DISTINCT files.文件名,danwei.单位编码,sale.单位名称,sale.单据编号 from sale,danwei where danwei.单位名称=sale.单位名称 and files.文件名 like %(sale.单据编号)";
OleDbDataAdapter ad = new OleDbDataAdapter(sql, strcon);
DataTable dt = new DataTable();
ad.Fill(dt);
}
finally
{
mycon.Close();
}
textBox3.Text = "排序完成";
}
SEL