How to print or export your database field names

Build your list of AccuZIP6 commands by requesting commands and sharing commands with other users

Moderators: Chrissy, Steve, Terry, Donna, Dave, Eric, MartyH, Kristen, Geoff, Vince

Post Reply
Kristen
Moderator
Posts: 726
Joined: Wed Sep 20, 2006 3:46 pm

How to print or export your database field names

Post by Kristen » Fri Apr 18, 2008 3:58 pm

This command creates a .txt file listing the field names and their types in your database:

Code: Select all

cset=[SET SAFETY OFF]
&cset
PUBLIC com_File
COPY STRUCTURE EXTENDED TO "c:\_struct.dbf"
SELECT 0
USE "c:\_struct.dbf"
com_File=PUTFILE("Save","Structure.txt","TXT")
COPY TO (com_File) ;
FIELDS field_name,field_type,field_len,field_dec TYPE delimited
USE IN IIF(USED("_struct"),SELECT("_struct"),0)

Post Reply