Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a field in Repository to all tables
Message
From
31/07/2001 18:25:49
 
 
To
31/07/2001 10:34:41
Rex Mahel
Realm Software, Llc
Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Stonefield
Miscellaneous
Thread ID:
00537742
Message ID:
00538078
Views:
11
Hi Rex.

>I need to be able to add a field defined in the Field Repository to all tables. If I add the field programmatically, will SDT adjust the related view the next time I run SDT?

No, but you can code that. The RedefineAllViews method of SDT.SCX does the heavy lifting:
set path to <directory for SDT files>\SOURCE 
open database <database name>
do form SDT with , dbc(), , .T. noshow name oSDT
oSDT.RedefineAllViews('<table name>', .T.)
oSDT.Release()
In SDT 6, it's a little different, since the code has been moved from the form to an object:
open database <database name>
oMeta = newobject('DBCXMgr', ;
  '<directory for SDT files>\SOURCE\DBCXMgr.vcx', ;
  '', .F., '<path to DBCXREG for database>')
oSDT = newobject('SDTDBUtilities', ;
  '<directory for SDT files>\SOURCE\SDTManagers.vcx')
oSDT.RedefineAllViews('<table name>', oMeta, .T.)
Doug
Previous
Reply
Map
View

Click here to load this message in the networking platform