Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01322172
Message ID:
01322318
Views:
11
About Borislav code below:

=======================================
USE NewKey IN 0
IF NOT FLOCK([NewKey])
MessageBox([Somebody tries to add records right now, please try after a few seconds])
RETURN
ENDIF
=====================================

As far as I understood, there is a small chance 2 users are
saving the record at the same time. And also this event
will last just for a little while (correct me if I am wrong)

So instead I messagebox, is there a way that in case FLOCK( ) fails,
the software would wait a second and try it one or more times until it is sucessfully ?

(because maybe in a second the user would be already saved his record)

Moises
Previous
Next
Reply
Map
View