Hi,
I have a VB6 application that queries many DBF databases during program
execution. The program is super slow and I tracked it down to Opening a
Recordset where the database is a DBF database. It takes about 2 seconds to
make the connection...versus less than a half a second to an Access database
using the same ADO calls.
This is the connection I am using:
strADOConnDBFDriver = "Provider=MSDASQL.1;Extended
Properties=;DRIVER=Microsoft dBase Driver (*.dbf);DefaultDir="
strADOConnDBFSecurity = ";DriverId=21;FIL=dBase
IV;MaxBufferSize=2048;PageTimeout=600;UID=admin;"
strADOConnTypeDBF = strADOConnDBFDriver & strSourcePath & "\" &
strADOConnDBFSecurity
Is there a better adapter to use?
Thanks for any help in speeding up these connections.
Ron
Paul Clement - 31 Mar 2006 15:16 GMT
¤ Hi,
¤
¤ I have a VB6 application that queries many DBF databases during program
¤ execution. The program is super slow and I tracked it down to Opening a
¤ Recordset where the database is a DBF database. It takes about 2 seconds to
¤ make the connection...versus less than a half a second to an Access database
¤ using the same ADO calls.
¤
¤ This is the connection I am using:
¤ strADOConnDBFDriver = "Provider=MSDASQL.1;Extended
¤ Properties=;DRIVER=Microsoft dBase Driver (*.dbf);DefaultDir="
¤ strADOConnDBFSecurity = ";DriverId=21;FIL=dBase
¤ IV;MaxBufferSize=2048;PageTimeout=600;UID=admin;"
¤ strADOConnTypeDBF = strADOConnDBFDriver & strSourcePath & "\" &
¤ strADOConnDBFSecurity
¤
¤ Is there a better adapter to use?
¤
¤ Thanks for any help in speeding up these connections.
I would use Jet OLEDB and the dBase ISAM driver instead:
Dim cnn As New ADODB.Connection
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=E:\My Documents\dBase;Extended
Properties=dBase 5.0;"
Paul
~~~~
Microsoft MVP (Visual Basic)
Cindy Winegarden - 31 Mar 2006 21:10 GMT
Hi Ron,
What kind of DBFs are these files? If they're FoxPro files try using the
FoxPro and Visual FoxPro OLE DB data provider, downloadable from
msdn.microsoft.com/vfoxpro/downloads/updates .

Signature
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@msn.com www.cindywinegarden.com
> ...The program is super slow and I tracked it down to Opening a Recordset
> where the database is a DBF database. ....
> strADOConnDBFDriver = "Provider=MSDASQL.1;Extended
> Properties=;DRIVER=Microsoft dBase Driver (*.dbf);....