Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The difference between USE ... in 0 and USE ... AGAIN in
Message
De
02/04/2001 00:15:12
 
 
À
01/04/2001 22:33:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00490801
Message ID:
00490826
Vues:
8
Hi Hak,

The difference is that USE IN 0...AGAIN opens up a whole new copy of a table in a new workarea whereas USE IN 0 opens up the table in a new area but is subject to the "file is in use" or "file is already opened" error messages.

If a view, the difference can be important, because the source table only get's opened once with USE IN 0 but it's opened more than once with USE IN 0...AGAIN and the updates are coordinated differently.

>Hi all,
>
>I encountered strange situation on updating, actually transaction.
>I opened same parameterised,updatable,local view in 'USE ...again in 0'
>2 times with diffrent alias and do some jobs to reflect data changes as follows.
>
>lcAlias=SYS(2015)
>lcFile="lv_someview"
>
>FOR n=1 to 2
> IF n=1
> vcParms=parmsA && paremeters
> ELS
> vcParms=parmsB
> ENDIF
>
> USE (lcFile) again in 0 alias(lcAlias) && view open..
> select (lcAlias)
> =CURSORETPROP("buffering",5)
>
> SCAN
>* data handlings
> ....
> ....
> ENDSCAN
>
>ENDFOR
>
>And then on issuing =tableupdate(), RLOCK() returns .f. and failed to update
>on edited records.But newly added records in both views, there was no problem.
>After replacing 'USE ...in 0' vc 'USE ...agin in 0', there is no problems rega-
>rdless of edited or newly added record.
>Anyhow the problem was solved, but someone enlighten me what is the difference.
>
>Thank you.
>H.K.Lee
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform