Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why doesn't this generate an error?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00207092
Message ID:
00207116
Vues:
13
>Hello, all!
>
>Suppose there is a table, MyTable.dbf, opened on another machine on a network, SHARED.
>
>Now suppose on your machine, you try:
>
>USE MyTable.dbf EXCL
>
>You get an error "File access denied." So now try:
>
>USE MyTable.dbf SHAR
>
>No problem. But now do this:
>
>SELE 0
>USE MyTable.dbf EXCL AGAIN ALIAS MyTable2

>
>The table is opened, shared, with no error message, even though I requested EXCL.
>
>Anyone know why this is?
>Thanks in advance!
>Mark

From the help for USE:

AGAIN

To open a table concurrently in multiple work areas, you can do one of the following:

Select another work area and issue USE with the table name and the AGAIN clause.


Issue USE with the table name and the AGAIN clause, and specify a different work area with the IN clause.
When you open a table again in another work area, the table in the new work area takes on the attributes of the table in the original work area. For example, if a table is opened for read-only or exclusive access and is opened again in another work area, the table is opened for read-only or exclusive access in the new work area.


Since the table was already open, it used it's current status of shared, even though you specified exclusive because you did a USE...AGAIN.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform