0
我想是这样的:如何使用c#处理.dbf文件?
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
的问题是,同样的代码运行正常的XP,Visual Studio 2010中,Office 2007和windiws它在windows 7 64bit,visual studio 2008,office 2010上不起作用。 我真的不知道whatvis的区别,我是新的赢了7. 一些提示会很棒。谢谢。
Windows 7机器是64位的吗? – 2010-09-03 19:06:51
是的,Windows 7是64位 – jane 2010-09-03 19:09:12
要跟踪w/Mike的评论,你可以检查并看看你是否得到不同的行为,如果你设置你的项目目标Platorm生成设置从任何CPU到x86。某些数据库驱动程序不存在于64位平台中。 – 2010-09-03 19:22:45