Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File is in Use by Another User
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00676168
Message ID:
00676291
Vues:
14
>According to the HELP..
>
>"INSERT - SQL automatically locks the Table Header
>
>UPDATE - SQL automatically locks the Entire Table".
>
>Tommy
>

Where did you find this info (I recall seeing it in Help, but could not find at this moment).

Anyway, this is from Help to UPDATE-SQL:

Unlike REPLACE, UPDATE - SQL uses record locking when updating multiple records in a table opened for shared access. This reduces record contention in multiuser situations, but may reduce performance. For maximum performance, open the table for exclusive use or use FLOCK( ) to lock the table.


Ok, I found it:

Commands that Automatically Lock Records and Tables

Command Scope of lock
ALTER TABLE Entire table
APPEND Table header
APPEND BLANK Table header
APPEND FROM Table header
APPEND FROM ARRAY Table header
APPEND MEMO Current record
BLANK Current record
BROWSE, CHANGE and EDIT Current record and all records from aliased fields in related tables once editing of a field begins
CURSORSETPROP( ) Depends on parameters
DELETE Current record
DELETE NEXT 1 Current record
DELETE RECORD n Record n
DELETE of more than one record Entire table
DELETE – SQL Current record
GATHER Current record
INSERT Entire table
INSERT - SQL Table header
MODIFY MEMO Current record when editing begins
READ Current record and all records from aliased fields
RECALL Current record
RECALL NEXT 1 Current record
RECALL RECORD n Record n
RECALL of more than one record Entire table
REPLACE Current record and all records from aliased fields
REPLACE NEXT 1 Current record and all records from aliased fields
REPLACE RECORD n Record n and all records from aliased fields
REPLACE of more than one record Entire table and all files from aliased fields




>>I think Tracy suggestion is a good one. However, AFAIK (again) UPDATE SQL (DELETE SQL, etc.) commands don't lock table header, while VFP commands like REPLACE FOR, DELETE FOR, INSERT do. We need to check help on this topic (which commands lock table header/record and which don't).
>>
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform