DBF Structure

How I can obtain structure info of a DBF ?

 

PROC MAIN()
 
   SETMODE( 25, 80 )
   CLS
 
   USE ..\datas\TEST1
? "No Field Name T Size Dec"
   ? "-- ------------ - ----- ---"
 
   FOR nFld := 1 TO FCOUNT()
       * or : FIELDNUM( FIELDNAME( nFld ) 
       ? STR( nFld, 2, 0 ),; // CT Database Function
         PAD( FIELDNAME( nFld ), 12 ),; // Standard dBASE function
         FIELDTYPE( nFld ),; // CT Database Function
         STR( FIELDSIZE( nFld ), 5, 0 ),; // CT Database Function
         STR( FIELDDECI( nFld ), 3, 0 ) // CT Database Function
    NEXT nFld
 
    ? 
    WAIT "EOF DBF_Struct.prg"
 
RETURN // MAIN.DBF_Struct.prg"

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.