我正在尝试这样的事情:
string pathFiles = Path.Combine(Application.StartupPath, "DB");
string strconn = "Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;" +
"Dbq="+pathFiles+";";
OdbcConnection odbconn = new OdbcConnection(strconn);
odbconn.Open();
我得到了这个例外
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
问题是相同的代码在windiws XP、visual studio 2010、office 2007 上运行正常,但在windows 7 64bit、visual studio 2008、office 2010 上运行不正常。我真的不知道有什么区别,我是新手赢得 7. 一些提示会很棒。谢谢。