Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Private DataSessions: not so private
Message
From
28/01/1997 16:09:45
 
 
To
28/01/1997 12:50:03
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00018585
Message ID:
00018606
Views:
31
>I have transformed my whole application to private data sessions
>in the wish that every form were private, i.e. completely independent
>from the others that used the same tables.
>
>I have got frustrated once and again. The first, and tipical, was
>to set up the environment for each form; I made the class and it
>worked OK.
>
>Secondly and most frustrating was that I could not open a table that
>was already opened by the main program. I'll explain it further, as
>I think is worth mention:
>
>In the main program I open the 'setup' table, and it's intended to
>remain opened for all the forms (all being written with 'public'
>data sessions).
>When I created private data sessions, I could not open 'setup'
>again as VFP 3.0b told me it was already opened. I made:
>
> select('setup')
>
>and the answer was 0, so it was supposed not to be opened, but I
>could not reopen it. Weird.
>I had to redo a lot of routines as well as the main program, and I
>finally got it to work but with a lot of work arounds.
>
>As I see, the are not so private.
>
>After some other problems, I got the following one: I included a table
>in a form opened ReadOnly. The same table is in another form but is not
>ReadOnly. Te result: no matter how private is the form, the tables
>are opened the same that with USE...AGAIN, and if you open first the
>ReadOnly form, the second is going to be ReadOnly too. Annoying.
>
>I would like to hear from similar experiences and how you have
>solved this annoyances.
>
>Thanks,
>Javier.

Many SET commands are scoped to the datasession. You need to SET EXCLUSIVE OFF in either the DE BeforeOpenTables or the Form Load.

Craig
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform