Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record locking
Message
De
07/06/2005 14:17:37
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01020833
Message ID:
01021037
Vues:
19
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform