Re: Connect to Foxpro Data (*.DBF) in VB.Net
- From: "Cindy Winegarden" <cindy_winegarden@xxxxxxx>
- Date: Tue, 3 Jan 2006 12:56:36 -0500
Hi Eric,
First of all, be sure you have the latest FoxPro and Visual FoxPro OLE DB
data provider, available from msdn.microsoft.com/vfoxpro/downloads/updates.
ODBC is an older technology and does not support all versions of FoxPro
tables.
FoxPro tables come in 3 parts: the DBF is the main table, the FPT (optional)
is the contents of Memo fields, and the CDX (also optional) is the
associated index file. All three of these generally named the same excepting
the extension and if your table has Memo fields and indexes then the FPT and
CDX must be present.
There are two ways Fox tables are organized. First, there are "free" tables.
With free tables a DBC file is not present and the connection string should
reference only the directory where the files are found, as you have done
below.
Second, Fox tables can be associated with a "Database Container" (DBC, DCT
memo, and DCX index files) which contains metadata about the tables and
other features such as stored procedures and triggers. If a DBC is present
the path in your connection string should be something like
"C:\ESS2001\DATA\Whatever.dbc" .
You can use the same types of ADO.NET code for Fox tables as you would for
any other OLE DB-compliant data source.
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@xxxxxxx www.cindywinegarden.com
"EricLun" <eric_klyuen@xxxxxxxxxxx> wrote in message
news:127B59E8-4035-47DD-8C60-1BB7AFC249AD@xxxxxxxxxxxxxxxx
> How can i connect to a set of DBF files by
> What is the connection string to connect the DBF?
> I have try this one but error.
> connstr = "Provider = VFPOLEDB;Data Source=" & "C:\ESS2001\DATA\"
>
> I have the following question?
> 1. Does [OleDBConnection] Object support DBF Files? or i should use
> [ODBCConnection] ?
> 2. Should I it a must to have a "*.dbc" file ?
> 3. I need to use ADO instead of ADO.Net in VB.Net ?
.
- Follow-Ups:
- Re: Connect to Foxpro Data (*.DBF) in VB.Net
- From: EricLun
- Re: Connect to Foxpro Data (*.DBF) in VB.Net
- Prev by Date: Re: how do i connect to a remote database
- Next by Date: Re: Connect to Foxpro Data (*.DBF) in VB.Net
- Previous by thread: Re: Connect to Foxpro Data (*.DBF) in VB.Net
- Next by thread: Re: Connect to Foxpro Data (*.DBF) in VB.Net
- Index(es):
Relevant Pages
|