Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET DATABASE PATH in a multi user env.
Message
 
 
À
24/01/2001 11:57:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00467952
Message ID:
00467988
Vues:
11
See VFP Help on SET DATASESSION for all the parameters that are scoped to the data session. In my form class, I place all my SET commands in the LOAD. At the launch of my app, I open the database. However, I use UNC path to the DBC.

open data addbs(UNC_DATA_PATH) + "mydbc"

Once the DBC is open, you no longer need to deal with the path to the DBC. In the LOAD:

set talk off
set exclusive off
set multilocks off
set deleted on
set database to DATABASE_NAME

My form class and other classes have a constants file defined called DEFAULTS.H. This file also has #INCLUDE FOXPRO.H as the first line so I get all the VFP constants. This is where I define the UNC path to the DBC, the DATABASE_NAME, etc.

Now when I create a new form, the new form is based on my form class. You set this up in the VFP Options found under the Tools menu pad.

>Hi,
>
>I would like to know the accepted way of tracking down the path of the DATABASE folder.
>
>I setted up a multiuser env.
>On one station I have my DATABASE file and I want to access the same data from other network connected worksations.
>
>The way I figured to do this is as follows:
>I've difined a network drive with the shared folder is the one that containes the data folder.
>In the config.fpw file I wrote: DATABASE = "g:\data\data1.dbc"
>
>The application starts fine but form with private datasession can't find it. Should I define in each INIT FORM method the set database command?
>
>Is there a better solution?
>
>Thanks in advance,
>
>Yours,
>Gadi Hutt
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform