PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → MAJOR BUG in HF SQL v19
MAJOR BUG in HF SQL v19
Iniciado por guest, 19,ene. 2015 19:03 - 2 respuestas
Publicado el 19,enero 2015 - 19:03
Hi,

1) Start a transaction, with HTransactionStart
2) write some code to do HAdd (or HModify) on some files
3) Now before Canceling (or commiting) the transaction - do a ProgramEnd (or just break the execution with the help of the debugger).
Number (3) is just a common trick to emulate an unexpected application termination. It could be ANY abnormal termination ....

Next time you go in the app, and try to run a query on the infected tables, you get an error saying you have a transaction that hasn't been canceled etc
You cannot cancel the transaction with code and you CANNOT cancel it even in the HF control center.
The only thing you can do is free the records to go on .....But the CC still shows this transaction in "transactions in progress".

It does NOT happen when you use HF C/S v17.
It happens when using HF C/S v 19 (both with WD17 and WD19 applications)

HF C/S v17, takes care of these kind of abnormal terminations - inside a transaction.
Just like the documentation says it does ...

HF C/S v19 (latest) cannot handle this error anymore !!!!!

Steven Sitas
Publicado el 19,enero 2015 - 19:16
Forgot to say:
The ONLY way to bypass this problem with HF SQL v19 is to RESTART HF SQL.
Then your HTransactionInterrupted() will catch the error and you can handle it then with HTransactionCancel()
Publicado el 20,enero 2015 - 15:44
Hi Steven,

We too ran into quite uninteresting problems with transactions. (Unfortunately, the Free Tech Support was not able to replicate any of these problems.)

The only solution was to free these transactions on HFSQL Control Center, and they were not even visible! Then I tried to implement HTransactionFree(sFileName) which was found to work all the time in the most extreme of all cases we had.

Maybe it can help you in your case too? (This procedure is in desperate cases for me, because it switch all transaction records in normal records. Which can be undesired in some cases, but is the only way to unlock the DB.)

Best regards,
Alexandre Leclerc