Re: invalid path error while accessing FOXPRO table from c#
- From: "Abhay" <abhayjoukani@xxxxxxxxx>
- Date: 4 Jun 2006 11:13:20 -0700
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!
.
- Follow-Ups:
- Re: invalid path error while accessing FOXPRO table from c#
- From: Cindy Winegarden
- Re: invalid path error while accessing FOXPRO table from c#
- References:
- invalid path error while accessing FOXPRO table from c#
- From: abhayjoukani
- Re: invalid path error while accessing FOXPRO table from c#
- From: Cindy Winegarden
- invalid path error while accessing FOXPRO table from c#
- Prev by Date: sql server 2005 crashes by sqlbulkcopy when the column size does not match
- Next by Date: Re: Implement ADO.NET Row Level Pessimistic Locking
- Previous by thread: Re: invalid path error while accessing FOXPRO table from c#
- Next by thread: Re: invalid path error while accessing FOXPRO table from c#
- Index(es):
Relevant Pages
|
|