Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record locking within an SQL stored procedure
Message
De
29/12/2005 14:16:06
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Record locking within an SQL stored procedure
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01081764
Message ID:
01081764
Vues:
66
Hi

I'd like to be able to perform record locking, row update, within SQL2000. Basically, I'm trying to do the following:

1. Select the correct record
2. Attempt to lock record
3. If able to lock, update a field within that record, release lock
4. If not able to lock, attempt to lock for a specified amount of time.

Here are some questions:

1. If I attempt to lock the record with the select, what happens if the record is already locked or I'm unable to complete the lock? i.e. I'd want to be able to return a code to the calling program why the SQL procedure couldn't lock the record.

Basically, it's as simple as that but it I've found it hard work reading the on-line SQL help files. The record locking MUST be completed by SQL server as the procedure will be called from VFP, VB and various other technologies.

Regards
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform