Versions des environnements
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement