Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data environment gotcha?
Message
De
01/10/2001 22:05:07
 
 
À
28/09/2001 10:43:28
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00561731
Message ID:
00562850
Vues:
24
>Just a minor addition:
>
>>	FOR lnCount = 1 TO lnObjects
>>>		loObject = EVALUATE('THIS.' + laObjects[lnCount])
>>>		IF UPPER(loObject.BaseClass) = 'CURSOR'
>>>			lcDatabase = loObject.Database
>* If this is a free table, <b>it's .CursorSource</b>
>>>			IF !EMPTY(lcDatabase)
>>>			   loObject.Database = ForcePath(lcDatabase, lcPathSet)
>			ELSE
>			loObject.cursorsource=ForcePath(loObject.cursorsource, lcPathSet)
>>>			ENDIF EMPTY(lcDatabase)
>>>		ENDIF UPPER(loObject.BaseClass) = 'CURSOR'
>>>	NEXT lnCount
>
>I simply prefer using ForcePath(), not because it's an old FoxTools function, but because it doesn't care whether the path has a final backslash or not.
>
>Another gotcha is when you copy a form from one project to another using SaveAs, it will recalculate the paths for all its tables in the DE to point to the old location. You must copy it as a file (i.e. as a pair of files).

Too true.... to get around that I have in place a default boot up which predefines data and drive locations based on application needs. Sort of like one of the previous thread messages had... but it is an independant object created as part of the 'compiled' program. It insures .scx/.frx files have the correct map based on the ultimate destination - before compiling/recompiling the form. I generally do not copy from one app to another per say... I just use a framed form without DE details... a bit slower but helps solve problems before they happen... :-)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform