Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 7 Monaten
Letzter Beitrag:
vor 2 Jahren, 7 Monaten
Beteiligte Autoren:
Arekusei Timakobu, Paulo Oliveira, GuenterP, DarrenF

Problem with HModify?

Startbeitrag von Arekusei Timakobu am 09.11.2015 07:22

There is a simple code (working in separate thread):

IF HFound() THEN
Events.isSent = True

Database errors are automatically handled. The error has been occured:

Record modification. The record was modified since the last read operation.

Does anyone has expierence with similar thing?



1 - in oder to get more details, I'd write

IF NOT HModify(Events) THEN
Error(... , HErrorInfo(ErrorFullDetails) )

2 - this message makes sense for a multi-user program in order to signal that between reading and modifying a modification from another client in the network occured. Means, if this is the case, its a definite case for implementing a transaction in order to keep others from modifying the Event-records.

3 - If it is a single-user program then a) the databas could need a restructure or reindex. b) Look into the HFSQL Control Center whether all of the links to / from the Event file are correct and there are no duplicates. You can correct a wrong situation in the HFSQL Control Center.

von GuenterP - am 09.11.2015 07:46
1 - in oder to get more details, I'd write

As I wrote above the automatic error handling is used and the error message is enough informative :)

The program is a single user and only one user had access to HFSQL file and the error as I understand occured between HReadSeekFirst and HModify.
I've tried to use re-indexing as you have suggested. Thank you. Will see for results.

von Arekusei Timakobu - am 09.11.2015 09:06

Do you have any Triggers defined on the database?

von DarrenF - am 09.11.2015 11:54
HReadSeekFirst and HModify are in the same thread?

von Paulo Oliveira - am 09.11.2015 12:37
No triggers and both statements are in the same thread. I think maybe some ocasional HFSQL server problem.

P.S. I changed the couple of operators HReadSeekFirst/HModify to HExecuteQuery("UPDATE ...") with transaction flag. Hope it helps.

von Arekusei Timakobu - am 10.11.2015 07:40
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.