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



Cindy Winegarden wrote:
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:1149152589.751707.171840@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.

i have installed Microsoft's oledb drivers for foxpro + MDAC
PN :- i have tries this connection string also
"Provider=VFPOLEDB.1;Data Source="C:\mmyyyy.dbf;"


thank you Cindy, you are a life saver :). i realised my mistake!!
thought having said this i have another problem! i hope u would help me
out!

i need to fill a (free) table which has the following structure

field_name width dec type nulls
EMP_NO 7 numeric no
NAME 30 char no
FATHER 30 char no
BIRTHDAY 8 Date no
SEX 1 char no
APPOINTED 8 Date no
xxx 10 numeric no
xxx 10 numeric no
xxx 10 numeric no
xxx 10 2 numeric no
xxx 10 2 numeric no
xxx 10 2 numeric no
xxx 7 numeric no

total width = 162


NOW i know this is a stupid ? to ask as the structure does not allow
null values!! but i want to store null values for every collumn !!

could u give me a FOXPRO command to create such table which also accept
null values! and is the same replica of the rest of the structure <<
DBASE IV offcourse

I tried to create such a table with foxpro 6.0 but it seems to change
the TOTAL WIDTH from 162 to 169



PN :- i need such a table in which i could insert null values in all
columns!

.



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.data.oledb)
  • 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)