Would This Help, The structure of Sys_Dict.Dbf is easy, It is the same as Copy Stru Extended.<br><br><br>*/***************************************************************************<br>*/Program : SYS_DICT.PRG<br>*/System :<br>*/Purpose : Create a generic data dictionary program<br>*/Syntax : =SYS_DICT() or =SYS_DICT("c:\xxx\xxx"

<br>*/Returns : nothing<br>*/Parameter : DIR - string - Directory to build the data dictionary in<br>*/Defaults : dir = sys(5)+sys(2003)<br>*/Requires : nothing<br>*/Changes : SYS_DICT.DBF<br>*/Version : 1.0<br>*/Dated : 23 May 1993<br>*/Written By: David W. Grewe<br>*/***************************************************************************<br>*& Utility - Programing<br>*/***************************************************************************<br>*/ Record Of Change<br>*/<br>*/***************************************************************************<br>*/ Program standards:<br>*/ FoxPro Command Words - lower case<br>*/ Memory Variables & UDFs - UPPER CASE<br>*/ Memory variable naming method:<br>*/ F_ (Global - File) Holds Info About The User.<br>*/ C_ (Global - Constant) once defined they are never changed.<br>*/ G_ (Global - Public  

may be accessed/changed by any file or procedure.<br>*/ P_ (Private - used to pass values as parameters to and from procedures.<br>*/ L_ (Private - used only inside a file or procedure.<br>*/***************************************************************************<br>parameter pcSearchPath<br>if parameters() < 1 or type("pcSearchPath"

# "C"<br> pcSearchPath = sys(5)+sys(2003)<br>endif<br>*<br>set default to (pcSearchPath) && Shift default to work area<br><br>set step on<br><br>if sys(5)+sys(2003) != pcSearchPath<br> wait window proper(pcSearchPath) + chr(13) + "is not a valid path !!"<br> on error<br> set defa to &lcStartDir<br> return<br>endif<br>*<br>if right(pcSearchPath,1) != "\"<br> pcSearchPath = pcSearchPath + "\"<br>endif<br>*<br>if upper(pcSearchPath) = sys(2004)<br> set defa to &lcStartDir<br> wait window "FoxPro launch directory " + chr(13) + ;<br> proper(sys(2004)) + " is not available !!"<br> on error<br> return<br>endif<br>*<br>* set enviroment<br>*<br>close all<br>clear<br>set sysmenu on<br>set sysmenu to default<br>set exclu off<br>set exact on<br>set talk off<br>set exclusive off<br>set safety off<br>on error **<br>*<br>* declare memvars<br>*<br>lnDbfs=0<br>lnFields=0<br>lcStartDir = sys(5)+sys(2003)<br>lcDataDbf=pcSearchPath + "SYS_DICT.DBF"<br>lcDataCdx=pcSearchPath + "SYS_DICT.CDX"<br>lcDataFpt=pcSearchPath + "SYS_DICT.FPT"<br>*<br>* Open/Create Databases<br>*<br>if file(lcDataDbf)<br> use (lcDataDbf) order table alias SYS_DICT exclu<br> copy stru to C:\TEMP<br> select 0<br> use C:\TEMP exclu<br>else<br> return<br>endif<br>set order to table<br>*<br>* Test for dbf files in specified path<br>*<br>lnDbfs=adir(laDbfs,"*.DBF"

<br>if lnDbfs < 1<br> wait window proper(pcSearchPath) + chr(13) + "does not contain databases !!"<br>else<br>*<br>* ran out of reasons not to do it so here goes<br>*<br> =asort(laDbfs)<br> @ 1,1 say "Databases To Place In Dictionary"<br> @ 2,12 say lnDbfs<br> @ 3,1 say "Completed"<br> for I = 1 to lnDbfs<br> @ 3,12 say I<br> @ 4,12 say padr(laDbfs(I,1),15)<br> do case<br> case upper(laDbfs(I,1))="SYS_DICT.DBF"<br> loop<br> case upper(laDbfs(I,1))="FOXUSER.DBF"<br> loop<br> case substr(upper(laDbfs(I,1)),1,4)="TEMP"<br> loop<br> case substr(upper(laDbfs(I,1)),1,3)="DWG"<br> loop<br> endcase<br>*<br>* put field structure into to an array<br>*<br> lnError=0<br> on error lnError=ERRORTRAP()<br> select 0<br> use laDbfs(I,1) alias IMPORT shared<br> if lnError < 0<br> on error<br> loop<br> endif<br> on error<br> copy stru extended to c:\stru<br> use<br> select temp<br> zap<br> append from c:\stru<br> replace all table with strtran(laDbfs(I,1),".DBF",""

<br> goto top<br>*<br>* populate the data database<br>*<br> scan all<br> scatter memvar memo<br> if !seek(M.TABLE+M.FIELD,"SYS_DICT"

<br> insert into SYS_DICT from memvar<br> endif<br> endscan<br>*<br> select TEMP<br> zap<br> endfor<br>*<br>endif<br>close databases<br>delete file ("C:\TEMP.DBF"

<br>delete file ("C:\TEMP.CDX"

<br>delete file ("C:\TEMP.FPT"

<br>delete file ("C:\STRU.DBF"

<br>delete file ("C:\STRU.CDX"

<br>delete file ("C:\STRU.FPT"

<br>set defa to &lcStartDir && Restore user default<br>release array laFields,laDbfs<br>release all<br>set sysmenu to default<br>on error<br>clear<br>return<br><br>*!*****************************************************************************<br>*!<br>*! Procedure: ERRORTRAP<br>*!<br>*! Called by: DICTDATA.PRG<br>*!<br>*!*****************************************************************************<br>procedure ERRORTRAP<br>*******************<br>return -1<br>*: EOF: DICTDATA.PRG<br><br> <p>David W. Grewe<br><a href=mailto

ave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>