Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a field in Repository to all tables
Message
De
31/07/2001 18:25:49
 
 
À
31/07/2001 10:34:41
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Stonefield
Divers
Thread ID:
00537742
Message ID:
00538078
Vues:
10
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform