Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a good way to return the fields in a foxpro database?

Status
Not open for further replies.

NSMan

Technical User
Aug 26, 2004
72
US
I'm completly new to foxpro, and I am doing something that requires me to create a script that converts a bunch of Foxpro databases into SQL tables.

I thought it'd be nice to have something that would return the fields in a paticular database, or all the databases in a directory. That way I could convert any foxpro database into a sql table without having to manualy reference every field from every foxpro database I'm going to accessing. Has anyone ever done anything like this before?
 
Lots of functions to help you here:

AFIELDS() will give you the fields in a table
ADATABASES() will give you open databases
ADIR() will give you files in a particular folder
AUSED() will give the open tables

All return the information in an array. If you look these up in Help and follow the See Also links then you'll find more.

fields in a paticular database

When you're looking through Help, remember that a database contains many tables and each table contain many fields.

Geoff Franklin
 
Yeah, I know, that one threw me for curvballs after using SQL Server :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top