Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Don't want to use data environment
Message
 
À
08/02/2001 22:10:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00474308
Message ID:
00474414
Vues:
14
We had the same problem so I made this little program:
lparameters poDataEnvironment
local lnCursors, laCursors(1), lnCnt, lcSource, lcAlias
lnCursors = amembers(laCursors, poDataEnvironment, 2)
for lnCnt = 1 to lnCursors
	lcSource = alltrim(laCursors(lnCnt))+".CursorSource"
	lcAlias  = alltrim(laCursors(lnCnt))+".Alias"
	poDataEnvironment.&lcSource = gPath+"\"+poDataEnvironment.&lcAlias+".dbf"
endfor
Placed it as a program file called cursors.prg and then in the Forms Data Environment in its BeforeOpenTables Event we have following code line:
do prgs\cursors.prg with this
Then gPath was a global variable which contains the path to the data folder. We use free tables though.

>Hi. VFP6. I am writing a multi-user app. I don't want to use the data environment in my forms because the location of the data will change once I "go live". In which method would I code the data environment for my forms? Also, what functionality will I lose (other than drag-and-drop in my form design)?
>Is there another solution? I plan to store my data path in a dbf and use '."\filename'" to load my data.


HTH
- Erik Niese-Petersen

Crazy Dane in USA.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform