Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00358494
Message ID:
00358567
Views:
12
Hi Joe.

>> Someone else may have already incremented status.numemp so I need to refresh the
status table buffer. It looks like I need to use CURVAL() but I'm not sure how. <<

If you must do this, IMHO it would be better to handle it by leaving the Status table closed until you either need to read or update it. That way you will minimize you multiuser contention issues. Something (untested code off the top of my head) like this:
USE Status IN 0

CURSORSETPROP( 'Buffering', 1, 'Status' )

IF RLOCK( 'Status' )
   REPLACE NumEmp WITH NumEmp + 1 IN Status 
   UNLOCK IN Status
ENDIF

USE IN Status
Marcia
Previous
Reply
Map
View