Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error when opening paradox Recordset with ADO 1

Status
Not open for further replies.

Bickle

Programmer
Jul 12, 2001
22
0
0
FR
I have a problem when I open a Paradox Database Recordset with ADO, the message I receive this message :

Run-time Error '2147467259(80004005)': [Microsoft][ODBC Paradox Driver] External table is not in the expected format."

Thank you for any ideas - Adrian

Code Example :

Dim cn as new adodb.connection
Dim rs as new adodb.recordset

cn.open "Driver={Microsoft Paradox Driver (*.db )};" & _
"DriverID=538;" & _
"File;" & _
"DefaultDir=" & "c:\PFRTITRE.DB"& ";" & _
"Dbq=" & "c:" & "\;" & _
"CollatingSequence=ASCII"

rs.Open "select * from PFRTITRE", cn

rs.Close
cn.Close
 
What version is the Paradox table that you are attempting to open?

Depending on the version, you may need to insert this in your driver data, like so:

"DriverID=538;" & "Fil=Paradox 7.X;" & etc.

In this example, it's a paradox 7.0 table that is being opened.

Hope this helps,

Robert
 
Sorry, the same problem happens even when I specify the FileType. It may be a problem related to the MDAC version ?

Thanks
 
It's possible. I would suggest getting the latest MDAC update anyway.

Even with the correct drivers though, I have found that opening paradox tables in ADO is very very slow.

Which version is the paradox table? I'm not sure that the drivers even work with the newest versions.

Robert
 
In fact with the new versions of Paradox with MDAC, all that you can do is read the file (not update etc.).

From version 3 to 7, I have the same result. even with the latest version of MDAC

Adrian
 
Hmm. The only other difference I see is that in my connection I specify a provider, like so.

DB.Open "Provider=MSDASQL;Driver={Microsoft Paradox Driver (*.db )};" & "DriverID=538;" & "Fil=Paradox 7.X;"

Other than that, I'm stumped. You might also try asking in the paradox forum.

Robert
 
ok thanks, I will keep you posted...
 
Conclusion : I installed the BDE from Bordland and it worked fine. The Microsoft Paradox ODBC driver in fact goes it alone if the BDE from Bordland is not installed and it doesn't always cope...
 
OK thanks for the update. Glad to hear it works now.

I give you a star because so many times people do not post back when they solve a problem like this. It helps for the future users who actually take the time to do a search before they ask a question.

As a note, my machine also has the BDE ( Borland Database Engine ) on it as well, because our security application uses it. I didn't even think that was why the code was working on mine!

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top