Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BIG BUG: first use noupdate put all next use to read-onl
Message
From
14/01/2004 15:57:06
 
 
To
14/01/2004 14:40:01
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00865913
Message ID:
00866888
Views:
18
Hi Aleksey,

----------
Visual FoxPro opens a table only once. It doesn't matter how many cursors (work areas) in the same or in different data sessions exist for the table, the file for the table is opened only once and the first USE determines which mode is used to open it.
All subsequent USE commands reuse existing file descriptor.

Thanks, i known this for a single datasession and you expand to multiple datasession.
It is just this that I consider mistaken, and for multiple datasession it is more
mistaken because datasession simulate a data environment full isolate, and with
this you put join the status ( fortunately for we this is not true )

I think it is very hard to no put bugs on this schema.

In - fact, opplà the bug exist!

Try this:
SET STEP ON 
CD SYS(2023)

CREATE TABLE mytable FREE (AA I)
CLEAR ALL
CLEAR
PUBLIC dsession2
dsession2=CREATEOBJECT("SESSION")

* now : first open noupdate
USE mytable IN 0 NOUPDATE
? ISREADONLY() && PRINT .T.
SELECT 2
USE mytable again
? ISREADONLY() && PRINT .T. the FIST OPEN status is put on the workarea
SET DATASESSION TO 2
USE mytable
? ISREADONLY() && PRINT .F. !!!!
* Then your affirmation is not true
* But I Can Think datasession isolate the file status
* return to first open original datasession
SET DATASESSION TO 1
USE mytable again
? ISREADONLY() && PRINT .F. !!!!
* Now the table is open readwrite
* and the original status is lost
Aleksey, because the behaviour is not correct,
I suggest to the VFPT not to try to make up for,
but to remove this characteristic completely ,
that is to put flag NOUPDATE only on the structure of the workarea, and not
on the common file handle structure.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform