Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Free tables
Message
De
13/09/2005 11:48:10
 
 
À
13/09/2005 09:33:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Stonefield
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01049078
Message ID:
01049119
Vues:
7
Hi Stuart.

>I am using SDT to repair/update free tables but when they are created they are being created in the application directory and not the data directory, what is going wrong?

The path for free tables is stored in MPATH in COREMETA.DBF, accessible through the CBmPath property using the DBCXGetProp and DBCXSetProp methods. It's likely that the path is blank (other than the table name), so SDT creates the tables in the current directory.

One thing I usually do is put an expression into MPATH so at runtime, SDT will use the desired location. For example, I have an Application object instantiated into oApp that has a cDataDir property which specifies where data files go. The expression I use for the CUSTOMERS tables is:

= iif(type('oApp.cDataDir') = 'C', oApp.cDataDir, '') + 'CUSTOMERS.DBF'

The leading "=" tells SDT that this is an expression to be evaluated. The IIF() ensures that SDT doesn't have a problem evaluating this expression when oApp doesn't exist (such as in the SDT Database Explorer).

Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform