Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / March 2006



Tip: Looking for answers? Try searching our database.

Slow connecting to a DBF file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RSH - 30 Mar 2006 22:17 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.

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);....
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.