Delphi + ADO + dBase – Stack Overflow
Posted by jpluimers on 2013/04/10
For my research queue:
I should look at the below ConnectionStrings to access dBase with ADO from Delphi, If I ever need to do that.
Thanks Cromulent for asking, Nelson for editing and Pieter for answering:
Microsoft dBase ODBC driver
Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;OLE DB Services = -1;Extended Properties=dBase IV;Dbq=c:\mypathdoing operations like ADOTable1.Open are very fast (good) but GetIndexNames returns nothing (bad).
Microsoft Jet OLEDB 4.0 driver
Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=dBASE IV;OLE DB Services=-1;Data Source=c:\mypathdoing operations like ADOTable1.Open are exceedingly slow (bad) while GetIndexNames does return index names the way it should (good).
How do I get both speed and the index info via ADO for the dBase tables?
Microsoft Paradox Driver 7.x
“We use the following connection string which works really well.”
Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="Driver={Microsoft Visual FoxPro Driver};UID=;SourceDB=c:\mypath;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
–jeroen
Artur said
for dBase allways take ApolloDB from vista
Cameron said
Stop… back away from the ADO. It can work, but it is slow, buggy and there are no updates for it. There are several free alternatives like TDBF. Not sure they work with the latest dbase but are probably better than anything in the ADO.
jpluimers said
Sometimes you don’t have a choice, but when I have, I will certainly look at TDBF. Thanks for the tip!.
http://tdbf.sourceforge.net/
Franz-Leo Chomse said
There is a caveat.
In some circumstances the Microsoft drivers need an installed BDE.
jpluimers said
Do you know an example of when the Microsoft drivers need the BDE?
Franz-Leo Chomse said
Should be the latest Paradox database version. Microsoft didn’t update their driver, they just switched to using the BDE directly.
I don’t use Paradoy any longer, but I remember the error messages of the Microsoft drivers, when trying to create links in Access.
jpluimers said
Thanks.
Franz-Leo Chomse said
http://msdn.microsoft.com/en-us/library/windows/desktop/ms710922(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms715362(v=vs.85).aspx