110,537
社区成员
发帖
与我相关
我的任务
分享
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + System.Windows.Forms.Application.StartupPath + "\\temp.mdb";
OleDbConnection conn = new OleDbConnection(strConn);
string strsel = "";
DataSet ds = new DataSet();
strsel = "select * from temp";
OleDbDataAdapter da = new OleDbDataAdapter(strsel, strConn);
da.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
string s1 = ds.Tables[0].Rows[i][0].ToString() + " " + ds.Tables[0].Rows[i][1].ToString();
}