Re: invalid path error while accessing FOXPRO table from c#



Hi Abhay,

I recommend that you use the OLE DB data provider for FoxPro and Visual
FoxPro.

There are two formats that the connection string should take, depending on
what data you have.

For FoxPro "free" tables use just the path to the directory where the DBFs
are: "Provider=VFPOLEDB.1;Data Source=C:\Temp;" Note that the Data Source is
not in quotes it's delimited bye the equal sign and the semicolon. When you
want to work with a specific table you'll specify it in your SQL string:
strSQL = "Select * From SomeTable" (Table is C:\Temp\SomeTable.dbf)

For Visual FoxPro tables that belong to a "Database Container" you need to
specify the DBC in the connection string: "Provider=VFPOLEDB.1;Data
Source=C:\Temp\MyDBC.dbc;" If a DBC file is present with the DBFs then use
this format, otherwise use the free table format. Again refer to a specific
table in your SQL command: strSQL = "Select * From SomeTable"


--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@xxxxxxxxxxxxxxxxxxx


<abhayjoukani@xxxxxxxxx> wrote in message
news:1149152593.375819.122600@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
string strConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\mmyyyy.dbf;Extended Properties=DBASE IV;";

System.Data.OleDb.OleDbException: 'c:\mmyyyy.dbf' is not a valid path.

PN :- i have tries this connection string also
"Provider=VFPOLEDB.1;Data Source="C:\mmyyyy.dbf;"


.



Relevant Pages

  • Re: Using MS Access with Foxpro tables
    ... The people I am working with are using an application called "Arc GIS" for ... They are using Foxpro 5 to edit the files. ... They tell me the .dbf files they have provided are in dBASE IV format. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: invalid path error while accessing FOXPRO table from c#
    ... I recommend that you use the OLE DB data provider for FoxPro and Visual ... There are two formats that the connection string should take, ... this format, otherwise use the free table format. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: invalid path error while accessing FOXPRO table from c#
    ... I recommend that you use the OLE DB data provider for FoxPro and Visual ... There are two formats that the connection string should take, ... this format, otherwise use the free table format. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Using MS Access with Foxpro tables
    ... Foxpro files are not dBase IV format. ...
    (microsoft.public.fox.programmer.exchange)
  • Foxpro file creation
    ... I have created a screen using screen builder in Foxpro 2.6 for DOS. ... to see the file content in text format. ...
    (microsoft.public.fox.helpwanted)