A bit of a story, bare with me 
I do support for a small company that has a few Access-databases built over the last 15 years, but the developer suddenly left the company just over a year ago (and just dropped everything) :banghead:
That's not the problem (nor MY problem
). I just jump in, try to figure out problems and fix them for the company
These databases are deployed to customers of my client (they sell them as software)
The apps are quite complex in the sence of the processes they support (financial administration for insurancecompanies) and in the way they are build (not very smart and full of high risk/potential problems)
At one of my clients customers one of the databases tends to corrupt itself, but the cause is very hard to track.
What happened last year:
- dec-2013: 2 days after I started support (without any knowledge of the apps and the programmer gone) the database got corrupted
- a simple maintenance by MSAccess seemed to solve the problem
- dec-2013: after a few weeks the database got corrupted again. Again compacting seemed to solve the problem
- this happened one or two times more untill march. At that moment compacting seemed to work at first but with every major action in the app (a lot of data-edits) the database would get corrupted again, so now the database was rendered useless
- I started searching for the problem and found out that multiple tables had problems: unreadable data/records, null-values in autonum-fields, double value in Autonum-fields, "##############" in almost every other field, extremely high numbers for financial fields (normally <€100 but now values of 400.000.000.000.000.000 and more
- I managed to fix the tables (loosing some data) and went searching in the backups when the problems started. This went back to november-2013 (4 months!) where I found the first backup without any corrupt records. Backups only are kept 3 months but there were some older copies
- after a very teadious proces I was able to restore all lost data, correct the whole financial system (balance sheets etc
) and the problem seemed gone.
However, a month ago (jan-2015), my client called me and he mentioned that again in december (2014, one year later) he had compacted the database on his customers system because it wouldn't start.
I told him he should have mentioned this to me and went investigating the customers database: again corrupt records with the same problems as a year before.
Because I was busy on other projects I was not able to look into the problem at that time, but took some backups (going back to nov-2014)
Last week the system broke down again (halfway feb-2015) so it seems like it's exactly the same "process" as last year: some kind of problem somewhere around end-november/start-december (client doing some kind of finacial action? Investigating)
Anyways....long story. I noticed that a lot of the tables have autonumber "ID" fields but most tables don't have a Primarykey setup, no proper index, and even allow duplicates!! :banghead:
I'm wondering, are there cases in which Access could insert null or "wrong" values in a autonumberfield that is not setup as a primary key.
When I try to read the data in the corrupted records (f.e. by exporting to excel) it seems that in some cases the data is shifted a couple of fields, which would indicate a bug in the software.
This could explain the empty IDs, or maybe even corruption of the database when it goes beserk with these values of billions and maybe tries to insert these values in the wrong columns. Or maybe these billions are just interpretations of different values being inserted (like entering a data in a num-column resulting in a number)
I would normally expect errors from access, but since the dear programmer almost ALWAYS uses "on error resume next", most errors are just ignored, don't seem to occur, and because he has put on "error resume next" in almost every 10th codeline it's not even easy to just "enable" errors: if I just comment out all "on error resume next" all kinds of errors start to rise and none of the program works anymore :banghead:
To work my way to the errors I'm looking for I would first have to build proper error-handling for the whole program. And then hope that error that might cause these problems accidentally occurs again...
Fucking amateur!:banghead:
I'm trying to find out if the program has such huge bugs that certain function are actually causing the corrupting in the database (or that the corruption is "naturally" occuring ).
Because the backups only go back three months I have a gap of almost 1 month between the oldest backup (18-12-2014, corrupt) and the copy I manually downloaded a while ago (25-11-2014, no corrupt).
So there's a gap of 4 weeks in which it's not clear what actions/functions the customer has started that might have caused the corruption.
And because the proces/timing is almost exactly like last year I believe it's not just coincidental corruption...
I have created a small access-app that tests the database for certain problem, so at least I can quickly scan the database to see if the corruption starts to creep in again.
For now, I need to recover data and reset the whole financial balance again, but it would be nice to find a trace of an actual cause...
(I have never experienced this kind of recurring corruption in my 20 years of Access-programming)

I do support for a small company that has a few Access-databases built over the last 15 years, but the developer suddenly left the company just over a year ago (and just dropped everything) :banghead:
That's not the problem (nor MY problem

These databases are deployed to customers of my client (they sell them as software)
The apps are quite complex in the sence of the processes they support (financial administration for insurancecompanies) and in the way they are build (not very smart and full of high risk/potential problems)
At one of my clients customers one of the databases tends to corrupt itself, but the cause is very hard to track.
What happened last year:
- dec-2013: 2 days after I started support (without any knowledge of the apps and the programmer gone) the database got corrupted
- a simple maintenance by MSAccess seemed to solve the problem
- dec-2013: after a few weeks the database got corrupted again. Again compacting seemed to solve the problem
- this happened one or two times more untill march. At that moment compacting seemed to work at first but with every major action in the app (a lot of data-edits) the database would get corrupted again, so now the database was rendered useless
- I started searching for the problem and found out that multiple tables had problems: unreadable data/records, null-values in autonum-fields, double value in Autonum-fields, "##############" in almost every other field, extremely high numbers for financial fields (normally <€100 but now values of 400.000.000.000.000.000 and more
- I managed to fix the tables (loosing some data) and went searching in the backups when the problems started. This went back to november-2013 (4 months!) where I found the first backup without any corrupt records. Backups only are kept 3 months but there were some older copies
- after a very teadious proces I was able to restore all lost data, correct the whole financial system (balance sheets etc

However, a month ago (jan-2015), my client called me and he mentioned that again in december (2014, one year later) he had compacted the database on his customers system because it wouldn't start.
I told him he should have mentioned this to me and went investigating the customers database: again corrupt records with the same problems as a year before.
Because I was busy on other projects I was not able to look into the problem at that time, but took some backups (going back to nov-2014)
Last week the system broke down again (halfway feb-2015) so it seems like it's exactly the same "process" as last year: some kind of problem somewhere around end-november/start-december (client doing some kind of finacial action? Investigating)
Anyways....long story. I noticed that a lot of the tables have autonumber "ID" fields but most tables don't have a Primarykey setup, no proper index, and even allow duplicates!! :banghead:
I'm wondering, are there cases in which Access could insert null or "wrong" values in a autonumberfield that is not setup as a primary key.
When I try to read the data in the corrupted records (f.e. by exporting to excel) it seems that in some cases the data is shifted a couple of fields, which would indicate a bug in the software.
This could explain the empty IDs, or maybe even corruption of the database when it goes beserk with these values of billions and maybe tries to insert these values in the wrong columns. Or maybe these billions are just interpretations of different values being inserted (like entering a data in a num-column resulting in a number)
I would normally expect errors from access, but since the dear programmer almost ALWAYS uses "on error resume next", most errors are just ignored, don't seem to occur, and because he has put on "error resume next" in almost every 10th codeline it's not even easy to just "enable" errors: if I just comment out all "on error resume next" all kinds of errors start to rise and none of the program works anymore :banghead:
To work my way to the errors I'm looking for I would first have to build proper error-handling for the whole program. And then hope that error that might cause these problems accidentally occurs again...
Fucking amateur!:banghead:

I'm trying to find out if the program has such huge bugs that certain function are actually causing the corrupting in the database (or that the corruption is "naturally" occuring ).
Because the backups only go back three months I have a gap of almost 1 month between the oldest backup (18-12-2014, corrupt) and the copy I manually downloaded a while ago (25-11-2014, no corrupt).
So there's a gap of 4 weeks in which it's not clear what actions/functions the customer has started that might have caused the corruption.
And because the proces/timing is almost exactly like last year I believe it's not just coincidental corruption...
I have created a small access-app that tests the database for certain problem, so at least I can quickly scan the database to see if the corruption starts to creep in again.
For now, I need to recover data and reset the whole financial balance again, but it would be nice to find a trace of an actual cause...
(I have never experienced this kind of recurring corruption in my 20 years of Access-programming)
Attachments
Last edited: