本文介绍了是否可以读取.Net应用程序中的Paradox 7.x .db文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在.Net 3.5应用程序中读取Paradox 7.x .db文件,但在此方面没有成功.

I'm trying to read a Paradox 7.x .db file in a .Net 3.5 app and I'm not being successful on that.

首先,当我以用户或系统dsn的身份注册odbc时,Microsoft Paradox ODBC驱动程序仅显示不超过5.x的版本,因此它似乎不支持Paradox的7.x版本.

First of all, when I'm registering the odbc, as a user or system dsn, the Microsoft Paradox ODBC Driver only display versions up to 5.x, so it looks like that it does not support Paradox version 7.x.

connectionsstrings.com 上,我发现应该与Paradox 7一起使用的连接字符串.x:

At connectionsstrings.com I've found the connection string that is supposed to work with Paradox 7.x:

Provider=MSDASQL;Persist Security Info=False;Mode=Read;
Extended Properties='DSN=Paradox;DBQ=C:\mydbfolder;
DefaultDir=C:\mydbfolder;DriverId=538;FIL=Paradox 7.X;MaxBufferSize=2048;
PageTimeout=600;';Initial Catalog=C:\mydbfolder

但是当我尝试使用数据适配器测试连接时,出现以下异常:

But when I try to test the connection using a Data Adapter I get the following exception:

错误[IM002] [Microsoft] [ODBC驱动程序管理器]数据源名称未找到且未指定默认驱动程序"

"ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"

我已将ODBC指定为用户DSN和系统DSN,但始终收到相同的错误.

I have specified the ODBC as a user DSN and as a System DSN as well but kept receiving the same error.

关于我该怎么办的任何线索?

Any clues on what should I do?

谢谢

佩德罗

推荐答案

http://www.progware.org/Blog/post/Connecting-to-a-PARADOX-DB-with-C-%28Vista-XP%29. aspx

ConnectionString.Append(@"Provider=Microsoft.Jet.OLEDB.4.0;");
ConnectionString.Append(@"Extended Properties=Paradox 7.x;");
ConnectionString.Append(@"Data Source=Z:\Dane;");
//ConnectionString.Append(@"Mode=ReadWrite;");
ConnectionString.Append(@"Mode=1;");

这篇关于是否可以读取.Net应用程序中的Paradox 7.x .db文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-30 09:01