Hi Jeff, You can use SAVE TO MEMO to store any variables into a memo field So if you have a tblDefinitions table that has a cName and a mStruct field You can do the following to fill the table:
LOCAL laFields[1] SELECT 0 USE tblSource1 AFIELDS(laFields, "tblSource1") SELECT tblDefinitions INSERT INTO tblDefinitions (cName) VALUES ("tblSource1") SAVE TO MEMO tblDefinitions.mStruct ALL LIKE laFields To recreate the tables defined in the tblDefinitions: CLOSE TABLES ALL LOCAL lcName USE tblDefinitions SCAN lcName = ALLTRIM(tblDefinitions.cName) RESTORE FROM MEMO tblDefinitions.mStruct ADDITIVE IF VARTYPE(laFields) <> "U" AND TYPE("laFields",1) = "A" CREATE TABLE (lcName) FROM ARRAY laFields ENDIF ENDSCAN Of course there are some path-issues in the provided code, along with some error handling, but it shows a possible way to do it. Regards, Sietse Wijnker > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Jeff > Sent: zondag 7 januari 2007 16:50 > To: [EMAIL PROTECTED] > Subject: storing table info in tables > > I need to be able to recreate free tables using information > stored in tables. I know how to create tables using SQL > statements but how would I pull the field [column - hate that > about VFP!] information [column name, type, character/column > length,... - all stored for reporting] to create a new table? > > jeff fisher, MCP > www.turbofish.com > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.