Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren
Letzter Beitrag:
vor 2 Jahren
Beteiligte Autoren:
Curtis, Steven Sitas, Stefan Bentvelsen

[WD20] Transactions and Reindexing

Startbeitrag von Curtis am 12.07.2016 14:26


I am testing WinDev's version of transactions. In the documentation from the link above and below the header, Tip: restoring the integrity of the database, I see "Note: After a power outage, we recommend that you reindex the data files of the application."

How can I reindex all the files via code? All I see is HIndex() and it only seems to work on one file at a time.


Hi Curtis,

via HListFile() you can get a list of analysis files.
You can execute HIndex() for each found file in a loop.

von Stefan Bentvelsen - am 12.07.2016 16:28
Hi Curtis,
If you are using HF C/S and the power outage is on a workstation (and NOT on the server), there is NO NEED to reindex the files.

Steven Sitas

von Steven Sitas - am 12.07.2016 17:06

I am using client/server. If the power outage occurs on the workstation then HTransactionInterrupted will still equal true, correct? So in my project initialization code below I just need to figure out how to only call ReindexFiles() if it was the server that crashed. Am I understanding this right?

EDIT: Also, using HListFile shows a compilation error with my current configuration. The error is, "The project is using native accesses, which is not available in integrated framework."

// Check database integrity in case of power failure, reboot, etc...
IF HTransactionInterrupted() = True THEN
IF Confirm("The transaction performed by computer " + H.TrsPost + " was interrupted. " + ...
"Do you want to restore the consistency of data files?") = True THEN
// Cancels the interrupted transactions
IF HTransactionCancel() = False THEN
Error("Unable to cancel the transaction.")


von Curtis - am 12.07.2016 18:36
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.