Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Good code in my Load Event?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Good code in my Load Event?
Divers
Thread ID:
00590717
Message ID:
00590717
Vues:
58
Hi - I just wanted to get some advice really - I use this code in the LOAD of all my forms where there is data involved...

if !dbused('gen_data')
open database gen_data shared
endif

set database to gen_data
set date british
set exclusive off
set multilocks on
set exact on


* open views

if !used('v_customers')
use v_customers shared in 0 nodata
endif

I have a couple of questions...

1. Should I be opening the database at the start of application rather than attempting it whenever I open a new form?

2. Is the order that I am doing things correct? ie. open and set database then set exclusive off?

3. Any other comments?
Chris Maiden
Email
Web
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform