Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to lock records in SQL Server
Message
De
03/04/2003 11:32:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00772304
Message ID:
00773590
Vues:
16
Samual,

You can have one table that has all the locking information for *all* tables. When a lock occurs, store the table name and the primary key of the table, along with user, timestamps, and other information.

Doing this requires no modification of existing tables. Also, to clear locks (at night, for example), a routine only has to look in one table to see what records are "locked".


>Hi Kamil,
>I've taken the hang problem into consideration.
>In my idea, if the computer hangs, the locked record will allow edit again in 3 ways:
>1) allow the same user to re-login to edit the locked record
> again regarding the locking flag.
>2) allow any other user to edit the locked record if it
> has been locked for over a period, such as over 3 hours.
>3) add function to unlock the record manually.
>to do above function, I need three more fields to record
>the locking status: locked, locked_by, locked_at
>
>Do you have any other comment?
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform