Re: multiuser problem by Stefan
Stefan
Mon Jan 10 05:30:07 CST 2005
> users access to the same form (same table), got the error message
> " File acces is denied "
Which line causes it? If it is this one:
> open database Mydata shared
in general, form.Init() is a little late for code to handle data /
environment stuff.
Assumed the form has references to MyData.dbc in its
dataenvironment, it tries to open it earlier, i.e. right after
form.DE.BeforeOpenTables(), where Set Exclusive is still "On"
(default, scoped to each datasession)
If you do not have any Cursor objects in the DE, the first form
event is Load(), which runs before any form-member objects
are instantiated.
So, in general better open the database.DBC shared once only,
early in your "main.prg". Or, alternatively, Set Exclusive Off in
each form.DE.BeforeOpenTables()
hth
-Stefan
"Eddy" <Eddy@discussions.microsoft.com> schrieb im Newsbeitrag
news:0A6DE03D-C2E8-4A08-968D-6EF4AA47A208@microsoft.com...
> Hi,
> I am using VFP6 SP4 and develope an application
> In the multiuser environment.
> The form's datasession is 2-Private Data Session
> In the init event of the form, have the following environment setting
> set exclusive off
> open database Mydata shared
> set multilock on
> select mytable
> = CURSORSETPROP('Buffering', 5, 'mytable')
>
> users access to the same form (same table), got the error message
> " File acces is denied "
>
> Does anything wroing here ? Please give suggestions
> thank your very much