var strPath = @"D:Test4#新程序全兼容4#新程序全兼容Data"; string myConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strPath + ";Extended Properties=Paradox 5.x;"; string mySelectQuery = "select * from TD2002002;"; OleDbConnection myConnection = new OleDbConnection(myConnectionString); myConnection.Open(); OleDbDataAdapter da = new OleDbDataAdapter(mySelectQuery, myConnection); DataSet ds = new DataSet(); da.Fill(ds);
4.0环境下anycpu会报错,编译成x86运行。4.5anycpu可以正常运行。