Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I set up shared tables on a network?
Message
De
03/01/2000 17:37:20
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
 
 
À
03/01/2000 17:21:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00311931
Message ID:
00311988
Vues:
46
>OK -- that all makes sense to me. However, how exactly do I go about putting the code in my workstation setup so that it will let me point to the server data files? I already have the DBCs installed on the server, but I am having trouble trying to figure out how to get the workstation installations to recognize where the data files are. Could you give me an example of the code I need to use and where to put it?
>
>Thank you!

A slight misunderstanding - I meant that you might want to put some code in your workstation application, NOT its Setup program. Although, it certainly would be more elegant to put code in the WS Setup, so it's ready to go the first time the user starts it up.

This is not a trivial task - I don't have code to offer but there are some general points to make:

- You need somehow to ask the user to locate a critical file. If you want to do it in VFP you can use GETFILE().

- Once you have the location, you need to store it somewhere so the user isn't asked again the next time the app is started. Nowadays the preferred location is the computer's registry. In the old days other approaches such as .INI files or memvar (.MEM) files were sometimes used. VFP6 has classes that handle registry-related functions.

- If you choose to set the location from the Setup program, you need to handle the case if the installer fails to choose a valid location.

The third point is a good argument for having the location code in your app, rather than as part of the setup program. That way, if the user can't/won't locate the shared files, the app won't start, which is expected behaviour. It makes the app a bit more self reliant and bulletproof.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform