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 05:01:02
 
 
À
12/01/2004 04:57:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00865913
Message ID:
00865914
Vues:
35
Hi Fabio

This is not a bug, check help. It has ALWAYS been like that!

>Hi,
>
>if the first USE command have NOUPDATE clause, then is impossible write on the table without
>close the dbf file ( as close all the workareas for the DBF ).
>
>Run this step-step repro:
>
>set step on
>CD SYS(2023)
>CREATE DATABASE tempdbc
>CREATE TABLE temptable (aa I)
>APPEND BLANK
>USE tempdbc!temptable AGAIN IN 0 ALIAS _readOnly NOUPDATE
>* now i can write
>APPEND BLANK IN temptable
>CLOSE TABLES ALL
>
>USE tempdbc!temptable AGAIN IN 0 ALIAS _readWrite
>USE tempdbc!temptable AGAIN IN 0 ALIAS _readOnly NOUPDATE
>* now i can write
>APPEND BLANK IN _readWrite
>CLOSE TABLES ALL
>
>USE tempdbc!temptable AGAIN IN 0 ALIAS _readOnly NOUPDATE
>USE tempdbc!temptable AGAIN IN 0 ALIAS _readWrite
>* now i cannot write !!!
>APPEND BLANK IN _readWrite
>* try to release the _readOnly workarea
>USE IN _readOnly
>* no effect, i cannot write !!!
>APPEND BLANK IN _readWrite
>CLOSE TABLES ALL
>
>* WORKAROUND: first open of the dbf it must be readwrite
>USE tempdbc!temptable AGAIN IN 0 ALIAS _workaround
>USE tempdbc!temptable AGAIN IN 0 ALIAS _readOnly NOUPDATE
>USE IN _workaround
>USE tempdbc!temptable AGAIN IN 0 ALIAS _readWrite
>* now i can write
>APPEND BLANK IN _readWrite
>CLOSE TABLES ALL
>
>CLOSE DATABASES
>DELETE DATABASE tempdbc DELETETABLES
>
>
>CAUSE: when a table is open first time, it allocate a file handle context for the dbf file, and
>after allocate a workarea context;
>the first USE put the NOUPDATE flag like file access to the dbf.
>
>My comment: better not to speak.
>
>Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform