General information
Category:
Coding, syntax & commands
Hi again,
This is the code I am using right now for my locking problem, and it's working.
**************************************************************
CLOSE DATABASES ALL
SELECT 0
USE data\leden INDEX data\lidnr SHARED
GO TOP
SET MULTILOCKS ON
SET REPROCESS TO AUTOMATIC
IF SEEK(ALLTRIM(ThisForm.txtlidnr.Value))
RLOCK(ALLTRIM(STR(RECNO())), 'leden')
IF ISRLOCKED()
m_wijziglid = .T.
WITH ThisForm
.cmbbranches.Enabled = .T.
.txtbedrnm.Enabled = .T.
.txtcontactpersoon.Enabled = .T.
.txtadres.Enabled = .T.
.txtpostcode.Enabled = .T.
.txtplaats.Enabled = .T.
.txtbankgiro.Enabled = .T.
.cmdopslaan.Enabled = .T.
.cmdnieuw.Enabled= .F.
.cmdzoeken.Enabled = .F.
.cmdzoekfactuur.Enabled = .F.
.cmdverwijderen.Enabled = .F.
ENDWITH
ThisForm.txtlidnr.SetFocus
ENDIF
ENDIF
***************************************************
In the Quit button of the form I put:
CLOSE DATABASES ALL
SELECT 0
USE data\leden INDEX data\lidnr SHARED
UNLOCK IN leden
*************************************************
I want to thank you for your help today, I was working for a deadline. And because of your help I was finnished right in time.
Greetings and thanks,
Ron
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only