Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locking records using Select-Sql
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00649340
Message ID:
00649377
Views:
10
Hi folks! (again)!

I've found() the solution myself! See below:
* For lock:
Select RecNo() As Registro, RLock() As Trava From Tabela Where Codigo = 1 Into Cursor Resultado
If Resultado.Trava = .F.
   MessageBox("Record in use for another user")
   Return .F.
EndIf
* For UnLock:
UnLock Record Resultado.Registro In Tabela
And that is all! :) - Someone can see anything wrong in this code?

[]s
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte
Previous
Reply
Map
View

Click here to load this message in the networking platform