Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ISRLOCKED doesn't work for me
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
ISRLOCKED doesn't work for me
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01635773
Message ID:
01635773
Views:
109
Hi Gang!

Question..... I am having a brain fart here......

I have in the Application a record I wish to be locked in a table called SS_IO.

So, we use RLOCK and lock it. Cool.

In another instance of the Application, we have another user who wishes to delete said record in SS_IO.

So, when the code runs for the second user to delete the record ( what we do is run the command REPLACE status WITH 2 IN ss_io to filter the record out... it is not really deleted ), the code execution stops and the "Press ESC... record is locked" wait window appears... Cool...

But, I'd like to catch this ahead of time when they press the delete button...........

I placed this code at the beginning of the Delete button code...
*TMT 05/03/2016 Check record to see if it is locked... if so, warn user and then exit....
IF ISRLOCKED()
	MESSAGEBOX('Cannot delete at this time.... the record is locked by another user..... try again later.',0+16,'Cannot delete')
	RETURN 
ENDIF 
I thought ISRLOCKED() would catch this for the second user, but it doesn't. It says .F. for the second, but .T. for the first.

Any ideas?

Thanks in advance !!
Tommy
Tommy Tillman A+ NetWork+ MCP
Next
Reply
Map
View

Click here to load this message in the networking platform