Accessing Foxpro DBF and index files

  • Thread starter Thread starter Guest
  • Start date Start date
try

string sConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=C:\dbf;Extended Properties=dBase III";
OleDbConnection oCn = new OleDbConnection(sConnection);
OleDbCommand oCmd = oCn.CreateCommand();
oCmd.CommandType = CommandType.Text;
oCmd.CommandText = "SELECT * FROM authors.dbf";
OleDbDataReader oRd = oCmd.ExecuteReader();
 
In news: (e-mail address removed),
maz said:
Please give me example to connect to DBF files and its indexes using
OLEDB.NET. Thank you.

Hi Ma,

Do you have the latest VFP OLE DB data provider, available from
http://msdn.microsoft.com/vfoxpro/downloads/updates/default.aspx ?

If the index files are CDX files (you will see CDX files that match their
corresponding DBFs) they will be updated automatically. If they're IDX files
then all I can say is that I haven't found a way to update these older-style
indexes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top