FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
HFSQL error: Unable to lock zone of <File> file.
HFSQL error: Unable to lock zone of <File> file.
Débuté par Arekusei Timakobu, 20 sep. 2017 09:26 - 6 réponses
Connectez-vous…
Arekusei Timakobu
#1
Posté le 20 septembre 2017 - 09:26
I get this error when I try to only modify record of some file. Record is added or deleted w/o any problem. Anyone knows how to fix?
P.S.File is re-indexed etc.
Signaler
0
0
DarrenF
#2
Posté le 20 septembre 2017 - 09:50
Hi,
A bit more information is required I'm afraid.
Can you describe in more detail about how you are currently attempting this - code samples always help...
e.g. Are you trying to Modify straight after adding the record?
Signaler
0
0
Arekusei Timakobu
#3
Posté le 20 septembre 2017 - 09:55
After some analysis the next thing was found out: the update form is called from internal window with Independent HFSQL context. When this checkbox is checked off the error dissapeared and record is modified. Yes, this is a solution but the reason of this behavour is still unknown because in other pair - TABLE on other internal window (with independent HFSQL context) and update form - all works fine.
Signaler
0
0
Arekusei Timakobu
#4
Posté le 20 septembre 2017 - 10:03
Quote
DarrenF
A bit more information is required I'm afraid
The common approach is TABLE control on internal window (with checkbox "Independent HFSQL context"), three buttons (Insert,Change, Delete) and update window. There is some CRUD class that manages the CRUD operations. What is done:
1. Click Insert - record added.
2. Click Change, change something, click OK... then some pause and the error appeares in error window (HOnError with hErrLock is used).
3. Click Delete - record deleted,
After consideration of source code I noticed that the error happends on HModify statement, i.e. it is catched by HOnError procedure. The simple code is:
IF NOT HModify(File) THEN ... END
The CRUD functionality is used in many places of the same software (with other files) and no errors occurred. The error is only for single file that is not some special thing.
Signaler
0
0
Steven Sitas
#5
Posté le 20 septembre 2017 - 10:47
Hi,
I am afraid it is difficult for somebody to help if he doesn't see your Change code.
Post the code AND your WX version AND Database (Classic or C/S)
Steven Sitas
www.alpha360.biz
Signaler
0
0
Fabrice Harari
#6
Posté le 20 septembre 2017 - 13:20
Hi
from the very little you are telling us, it looks like you are doing a hmodify without reading the record first.
Best regards
Signaler
0
0
Piet van Zanten
#7
Posté le 22 septembre 2017 - 11:26
Hi Arekusi,
It is not possible to update a record from a different context.
So you should really be worried why it is working in other cases and if it is not updating another record that happens to be in memory in that context.
Kind regards,
Piet
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte