Reading Visual foxpro table in VB 6.0

  • Thread starter Thread starter gurusamy sekar via AccessMonster.com
  • Start date Start date
G

gurusamy sekar via AccessMonster.com

Hi all..
I want to try to read visual foxpro free tables.i have my code as

Dim db As New ADODB.Connection
Dim rs As Recordset
If db.State = 1 Then db.Close
db.Open "Driver=(Microsoft Visual Foxpro Driver);sourcetype=DBF;sourceDB=D:\
tab;exclusive=No;collate=Machine"

Here "D:\tab" is my path where free table is present.

But it is giving error as default ODBC driver not specified.
If anyone know how to get this bug plz reply...
Thank in Advance.
 
Hi Gurusamy,

I recommend the FoxPro and Visual FoxPro OLE DB data provider (downloadable
from msdn.microsoft.com/vfoxpro/downloads/updates). The connection string
looks like:
"Provider=VfpOleDB.1;Data Source=C:\Temp;" .

For ODBC, try putting curly braces around the driver name:
"Driver={Microsoft Visual Foxpro Driver};......

--
Cindy Winegarden MCSD, Microsoft Visual Foxpro MVP
(e-mail address removed) www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
 
Back
Top