>I have a need to read a folder of free tables (*.dbf) and pull off each of the table name, field names, and field definition. How can i read in a program the table definition?
>
>Thanks
>
>Brenda
Ok, here is the utility:
BTW, John, could your utility output to a file (say, Word Document :))?
LS - LIST STRUCTURE Replacement May 5, 2001 22:21 File #
9608 Get annoyed by those word-wrapping list structure printouts? LS replaces the command by formatting the output to comfortably fit on the screen or on a printed page (in landscape mode), or in Print Preview.
Additionally, LS also lists all structural index tags, views in the same DBC in which the table participates in (with SQL), relations defined in the database, and related RI. If the open cursor is a view, local or remote, LS prints out the updatable, key, and source column properties as well as all view properties in the report header.
USE table
=LS(0 or .F. or omitted) && output to screen
--or--
=LS(1) && output to print preview window
--or--
=LS(2 or .T.) && output to printer
Version changes
-------------
Version 1.1, output now includes field rules and field defaults as well as tabel database name.
Version 1.11, output now includes ALIAS name. Thanks to Doug Dodge for the modifications.
Version 1.5, now list index tags and tag expressions and cleans up after itself better.
Version 2.0, now lists view participation, relations, and RI.
Version 2.5, now detects that the open cursor is a view and shows/prints accordingly.
Version 2.51, minor bug fix (Thanks, Nick) and added GETFILE to open a DBF if no table is open when LS is called.
Version 3.0, bugs fixed, print preview now supported, now fully documented
If it's not broken, fix it until it is.
My Blog