Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why lock() fails.
Message
De
23/10/2001 14:03:13
 
 
À
21/10/2001 11:36:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00570423
Message ID:
00572200
Vues:
23
>If you create a temporary cursor, you are the only one that accesses it. No need to LOCK(), or anything similar.

If temporary cursor is related to tables and temporary cursor record is
locked, related tables are locked also in previous versions of foxpro.
If related table has no data, it is locked at eof() position.
In my sample, LOCK() is used to change VFP error to other message. If I remove lock(), I get a vfp error on REPLACE command since REPLACE tries to place lock.

>If you want an updatable cursor, where changes go back to the underlying tables, use views.

If underlying table does not have unigue combination of fields, as invoice rows, it is impossible to update it using views. So i cannot use views.

>>I cannot use TABLEUPDATE() since this is temporary cursor. I use this cursor to collect document rows.
>>For saving document, I use COPY TO and TABLEREVERT()
>>
>>I added LOCK() command because without lock command, the same error occurs in REPLACE command. Using LOCK() I can output a friendly error message. However, error still occurs.
Andrus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform