Link to home
Start Free TrialLog in
Avatar of GregBo
GregBo

asked on

How to read a FoxPro dbf file structure in VB.NET ?

Hi,

I am writing a VB.NET application that reads data from dbf files (FoxPro).

I need a possibility to read a structure of a dbf file (column names and their types).

In FoxPro, for example, it can be achived by using LIST STRUCTURE command or
afields() function.

How can I do the same in VB.NET program ?

Regards,


Gregory
Avatar of Howard Cantrell
Howard Cantrell
Flag of United States of America image

you will need to connect to ADO.net with the string somethung like this....

Provider=MSDASQL;Persist Security Info=False;Extended Properties=Driver={Microsoft Visual FoxPro Driver};UID=;SourceDB=c:\temp\mydb.dbf;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;
change provider to ..
provider=VFPOLEDB.1
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GregBo
GregBo

ASKER

Bob,

Thanks a lot

Gregory
Since it appears that you are fairly new to E-E:

Closing Questions
https://www.experts-exchange.com/help.jsp#hi5

Bob