Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 6 Monaten
Letzter Beitrag:
vor 2 Jahren, 6 Monaten
Beteiligte Autoren:
Amal Murali, Peter Holemans, Fabrice Harari, Tor-Bjarne, GuenterP

Data in database table gets missing!!!

Startbeitrag von Amal Murali am 09.12.2015 08:26

Hello Mates;

I am facing an unusual scenario nowadays..I have a Windev application running and with Hyper file SQL as the database for the application. Everything works fine but now its showing some abnormalities like missing data. I will explain- i have one database table where a set of details regarding a product is stored, during some event of time this line actually gets empty(gets the data to zero instead of values). This is one difficult situation and I double checked my program and couldn't find out any code which empties the data in the database table.

Thanks in advance and requesting any idea/suggestions for the same


Hi Amal, did you repair the database?

von GuenterP - am 09.12.2015 09:01
Hiii Guenter;

This is not a frequent issue, the database and programs works fine for a time period and after that period some line of data will be made empty or zero in all fields. Its also not happening any particular table fields in different scenarios the data missing table changes.

Thanks for you kind reply

von Amal Murali - am 09.12.2015 10:14
Hi Amal,

I would suspect a bug in your code anyhow.

What you could do to trace more down is to have a Background task (Timer, thread or paralleltask) to check the particular database/table posting an error when it happens so the "What just happend now" could be narrowed down and the bug resolved.

I`ve have a lot of users using HF/SQL and classic, none has reported this (also it`s the first time as I recall on this forum to)


von Tor-Bjarne - am 09.12.2015 10:41
Hi Amal,

in my experience, this can happen in two cases:

1. a bug in your code (most often, a side effect of a wrong use of variable, but it can be a number of things, and is generally quite a pain in the butt to find)

2. a hardware problem corrupting the data during a write (power, network, hard drive, ram...).

It is most likely problem 1, as problem 2 would ALSO result in index problems that would oblige you to reindex regularly, and you are not talking about that.

Best regards

von Fabrice Harari - am 09.12.2015 11:09
Hi Amal,

Without knowing your coding style I expect this to be a bug typically caused by a record pointer still open to the record (hread, hreadseek, hreadseekfirst, hposition, ...) followed by a re-initialisation (hreset, Reset, assignment, ...) and an hModify...

Ideally you try to nail down the scenario in which this happens so you can identify the coding blocks involved in that scenario and next debug it locally.

When using HFCS, you can activate logging on that table to identify when it happens and hopefully you're using audit fields in your tables as well (user, last update timestamp, creation timestamp, function/procedure/method) to identify the source of the update.

Good luck!

Peter H.

von Peter Holemans - am 09.12.2015 11:44
Hiii Tor-Bjarne and dear Fabrice Harari;

First i would like to thank you for your reply.

Regarding the code i have tried the same debugging many days and couldn't find anything creepy to make my data missing. The same code and application i tried running on another client site works fine.

Secondly the data table where the data finds missing is a read only table, the application code is written in such a way it writes to that table when any new item is created and after creating that line of data of that particular item then the application only reads that line never modifies it.

I wonder how the full line become empty filled with "zero" replacing all data!!!!

von Amal Murali - am 09.12.2015 11:47
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.