c# 读paradox db file(.DB)数据
var strPath = @"D:\Test\4#新程序全兼容\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可以正常运行。