Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stru to repo ...
Message
From
18/02/1997 13:49:11
 
 
To
14/02/1997 15:51:22
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00020615
Message ID:
00020930
Views:
44
>>Hello all, Happy valentines day. I need to create a report that has all of the tables in a directory. Okay, no prob. However, I need to list all the fields and their attributes. ie: myfield C20 | MyCount N4
>>Any Ideas? I have never had to do anything like that before.
>>TIA.
>
>SELECT your_table
>COPY STRUCTURE EXTENDED TO rpttable
>and report this table.

Edward, Thanks a bunch. For now it is a stand alone proggie, but, it may be needed by the other subsystems in my group. My thanks again.
This is what I came up with ultimately:
	*****************************************************
	*** This proggie will create a table with all     ***
	*** the dbf's listing their field names and their ***
	*** field types and size.  This table will be     ***
	*** used to create a report to allow context      ***
	*** ID's to be easily assigned for the subsystem  ***
	*****************************************************
PRIVATE ALL LIKE *
CLOSE DATABASES                      && I want nice clean workareas

SET DEFA TO GETDIR()                 && select the directory to work

ADBFNUMBER = ADIR(ADBF, '*.DBF')     && Create array of DBF's

FOR NCOUNT = 1 TO ADBFNUMBER         && Loop for number of DBFs

      THE_TABLE = ADBF(NCOUNT,1)     && Create the name variable

      SELE 0 			     && To allow for future maint.
      USE &THE_TABLE                 && Use the table to get the info
      COPY STRU EXTE TO DELETEME     && Lets get the info for The_Table
	USE
	
      SELE 0 			     && To allow for future maint.
      USE DELETEME                   && Lets open the table with the info
      REPLACE TABLE_NAME WITH THE_TABLE ALL  && place the table name in
      
      SELE 0  			     && To allow for future maint.
	USE q:\home\jjohnsto\source\pack\zTblRepo && our MAIN table of fields
	APPE FROM DELETEME           && This will get the info on The_Table
	
	SELE DELETEME                && Lets go clean up
	use					 && avoid sharing violations
	DELE FILE DELETEME.*           && Get rid of it all
	
	CLOSE DATA				 && House cleaning
	
ENDFOR && NCOUNT = 1 TO ADBFNUMBER
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Reply
Map
View

Click here to load this message in the networking platform