Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Good code in my Load Event?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Good code in my Load Event?
Miscellaneous
Thread ID:
00590717
Message ID:
00590717
Views:
57
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
Next
Reply
Map
View

Click here to load this message in the networking platform