General information
Category:
Forms & Form designer
>
> 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.
Javier, Private Data Session seems working fine to me, since I can
opened several same forms or different forms using same tables. But the
following conditions might be consider :
1. Make sure that SET EXCL is OFF
2. I never like including tables in my forms' data environment. I always
open it programmatically in Load Event.
- Tony Mukli
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only