Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Better data environment for clients?
Message
De
14/05/1997 12:15:09
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00032200
Message ID:
00032204
Vues:
38
>Hi,
>My app has all free tables and every form's data environment is empty. My users are all on one campus, but on different networks. Some have Novell, some have NT, and some have Pathworks. I have no idea what their drive mappings are going to be. So, there is a form in my app where the user can enter the PATH to the data like: "M:\CONFIG\". Then the app carries the path as a variable. The path is stored in a field in a small table at the client.
>
>When the app starts it opens the table and picks up the path:
>use clientdat
>mDatapath = clientdat.path
>
>Later on, the LoadEvent of the Parent form opens the tables:
>mDBFtable1 = mDatapath+'TABLE1.DBF'
>mDBFtable2 = mDatapath+'TABLE2.DBF' , etc.
>
>set excl off
>sele 0
>use &mDBFtable1 alias table1
>sele 0
>use &mDBFtable2 alias table2
>sele table1
>set rela to somefield into table2
>
>Questions:
>Is this a stupid way to do this?
>Will this work when I create the .EXE and carry the app to other PCs?
>
>Thanx,
>John Morga

I don't think it's stupid, but I have a few questions.

Why all free tables? Sharing tables and maintaining data intergity is much easier within a DBC. If you don't use a DBC, using Data Environments with CURSORSETPROP() will help with multi-user editing.

Have you condidered using an INI to store paths? That sometimes make debugging, testing and user support a little easier, IMHO.

Also, either method will work with an exe.

HTH
Matt McDonnell
...building a better mousetrap with moldy cheese...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform