Struggling with multiuserenvironment...

A textbox with myView.myField (buffermode 3) as controlsource
B user 1 writes Hallo to the editbox and clicks in another texbox - fires
the first textbox´s valid-code:
SET REPROCESS TO 3 SECONDS
lcAlias = 'myView'
SELECT (lcAlias)
LOCK(lcAlias)
tableupdate(2,.F.,lcAlias) && returns T
UNLOCK ALL
C user 2 on workstation 2 can see Hallo in his textbox
D user 2 can do the same ("Hallo again") as B above && no error is reported
E User 1 can´t se Hallo again

If I replace LOCK(), UNLOCK with
tableupdate(2,.F.,lcAlias) && returns T
Select tblComp1 (the views sourcetable!!!!!!!!)
skip 1
everything works fine! but this can´t be the right way...

What am I missing????

Best regards
Christina

Re: Recordlocking VFP8-SP1 by Gregory

Gregory
Mon Jan 10 01:22:40 CST 2005

Christina,

What is the buffermode of the source tables ? It better be 1.

Sounds like the view is writing to the sourcetable which has buffermode 2 or
3.
Skipping a record commits the change in the current record

hth,

Gregory
_____________________________________________

"Ch Löfberg" <ch.lofberg@telia.com> wrote in message
news:4sjEd.13812$d5.116232@newsb.telia.net...
> Struggling with multiuserenvironment...
>
> A textbox with myView.myField (buffermode 3) as controlsource
> B user 1 writes Hallo to the editbox and clicks in another texbox - fires
> the first textbox´s valid-code:
> SET REPROCESS TO 3 SECONDS
> lcAlias = 'myView'
> SELECT (lcAlias)
> LOCK(lcAlias)
> tableupdate(2,.F.,lcAlias) && returns T
> UNLOCK ALL
> C user 2 on workstation 2 can see Hallo in his textbox
> D user 2 can do the same ("Hallo again") as B above && no error is
reported
> E User 1 can´t se Hallo again
>
> If I replace LOCK(), UNLOCK with
> tableupdate(2,.F.,lcAlias) && returns T
> Select tblComp1 (the views sourcetable!!!!!!!!)
> skip 1
> everything works fine! but this can´t be the right way...
>
> What am I missing????
>
> Best regards
> Christina
>
>


Re: Recordlocking VFP8-SP1 by Ch

Ch
Mon Jan 10 14:31:41 CST 2005

Hi Gregory!

That was a good point Gregory! I will make a test at once.

Regards
Christina

"Gregory Adam" <GregoryAdam@PleaseReplyViaNewsGroup.com> skrev i meddelandet
news:#EzHvWu9EHA.960@TK2MSFTNGP11.phx.gbl...
> Christina,
>
> What is the buffermode of the source tables ? It better be 1.
>
> Sounds like the view is writing to the sourcetable which has buffermode 2
or
> 3.
> Skipping a record commits the change in the current record
>
> hth,
>
> Gregory
> _____________________________________________
>
> "Ch Löfberg" <ch.lofberg@telia.com> wrote in message
> news:4sjEd.13812$d5.116232@newsb.telia.net...
> > Struggling with multiuserenvironment...
> >
> > A textbox with myView.myField (buffermode 3) as controlsource
> > B user 1 writes Hallo to the editbox and clicks in another texbox -
fires
> > the first textbox´s valid-code:
> > SET REPROCESS TO 3 SECONDS
> > lcAlias = 'myView'
> > SELECT (lcAlias)
> > LOCK(lcAlias)
> > tableupdate(2,.F.,lcAlias) && returns T
> > UNLOCK ALL
> > C user 2 on workstation 2 can see Hallo in his textbox
> > D user 2 can do the same ("Hallo again") as B above && no error is
> reported
> > E User 1 can´t se Hallo again
> >
> > If I replace LOCK(), UNLOCK with
> > tableupdate(2,.F.,lcAlias) && returns T
> > Select tblComp1 (the views sourcetable!!!!!!!!)
> > skip 1
> > everything works fine! but this can´t be the right way...
> >
> > What am I missing????
> >
> > Best regards
> > Christina
> >
> >
>