Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BIG BUG: first use noupdate put all next use to read-onl
Message
De
12/01/2004 06:32:30
 
 
À
12/01/2004 05:37:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00865913
Message ID:
00865919
Vues:
18
Hi Tore,


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.


On this is writted:
in the original work area

First Question: Who it is the original work area ?
The first Work Area filled with this table ?
But if i release the first work area ?

Second : I cannot use a work area like source for the USE command.
set step on
CLEAR 
CD SYS(2023)
CREATE DATABASE tempdbc
CREATE TABLE temptable (aa I)
APPEND BLANK
CLOSE TABLES ALL

* tempdbc!temptable is the table, not a WorkArea !

USE tempdbc!temptable			IN 0 ALIAS _readWrite
USE tempdbc!temptable	AGAIN	IN 0 NOUPDATE ALIAS _readOnly
* Now i try to use WorkAreas like source 
* ( this is not true because USE have the dbf file like source )
USE DBF('_readWrite')	AGAIN IN 0 ALIAS _readWriteClone
USE DBF('_readonly')	AGAIN IN 0 ALIAS _readOnlyClone
? ISREADONLY('_readWrite')	,ISREADONLY('_readWriteClone')
* ORIGINAL WORKAREA IS RW --> i aspected RW
? ISREADONLY('_readOnly')	,ISREADONLY('_readOnlyClone')
* ORIGINAL WORKAREA IS RO --> i aspected _readOnlyClone with RO

* RELEASE FIRST WORKAREA AND OTHER, PRESERVE _readOnly
USE IN _readWrite
USE IN _readWriteClone
USE IN _readOnlyClone
* Now Who is Original Work Area ???
USE DBF('_readonly')	AGAIN IN 0 ALIAS _readOnlyClone
? ISREADONLY('_readOnly')	,ISREADONLY('_readOnlyClone')
* ORIGINAL WORKAREA IS RO --> i aspected _readOnlyClone with RO

CLOSE TABLES ALL
CLOSE DATABASES
DELETE DATABASE tempdbc DELETETABLES
If this is by design, then the disign is mistaken or like ambiguous minimum.

A application like this:
- Open all on read-only for LOOKUP tables
- User click on a button for swap to readwrite mode
* i cannot do this without release all tables file handle, and reopen all tables;
* within this two phases i can have various problems

Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform