Corrupted database (1 Viewer)

Leo_Polla_Psemata

Registered User.
Local time
Today, 13:57
Joined
Mar 24, 2014
Messages
364
Hi there
My database crashed, doesn't open anymore.
I get the error "id is not an index in this table"

Then i continue on the back up, i lost no data but i am afraid .
that the backup database, has inherited all the "errors" from the original one

Is there any way i could find out and fix the corrupted items before i get again the same error?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 16:57
Joined
May 21, 2018
Messages
8,533
Remove all relations to that table.
Open table in design view and delete all indices
Save
Compact and repair
Add indices and relations back.
 

Leo_Polla_Psemata

Registered User.
Local time
Today, 13:57
Joined
Mar 24, 2014
Messages
364
Remove all relations to that table.
Open table in design view and delete all indices
Save
Compact and repair
Add indices and relations back.

Hi, i have removed all relations from ALL tables since i didn't know which table/tables causes the corrupt.
I still got the I get the error "id is not an index in this table"

Then i deleted ALL data from ALL tables , still
I get the error "id is not an index in this table"
plus another error
The Visual Basic for Applications in the database is corrupt

I can't compact and repair data base because if i try it pops up these messages

How could i dive into the VBA of this access ?
 

Cotswold

Active member
Local time
Today, 21:57
Joined
Dec 31, 2020
Messages
528
Can you not go back to yesterday's or last weeks backup? If you can get back to the backup before the corruption occurred, you can probably sort it. Once you do, create a new database and import all of the tables from the last good backup. If not, have you tried to import tables into a new database? Maybe one at a time until you come across the error table. If only one has the corruption you may be able to recreate the data.
 

Gasman

Enthusiastic Amateur
Local time
Today, 21:57
Joined
Sep 21, 2011
Messages
14,317
If you follow the link here, it might tell you whch table is at fault?


1669302941786.png
 

Leo_Polla_Psemata

Registered User.
Local time
Today, 13:57
Joined
Mar 24, 2014
Messages
364
Hi there

Thanks for your input. I have fixed my database.
After she crashed, I continue working with a backup that was created just before corruption- no data or workflow loss but I was afraid that I am working on a minefield since all backups would have inherited the corrupted records and sooner or later, I would get problems. ( * )

Anyway, I made a replica database, firstly moved all objects from one mdb to another, without data, then moved manually data, table by table, I found the bad records and deleted them. Now in the new database, I continue with much safety.

One question.
In the old database, there is one table, no relations at all, it works as a reference table for several dlookups.
When I tried to copy paste date, it popped up the below error

“Operation is not supported for this type of operation”

This table is empty and it doesn’t accept any data at all.
I bypassed this problem by creating a new table from scratch and replaced it the bad one,
now everything is correct, however, I can’t figure out what’s wrong with the bad table,
why a fresh made stand-alone table, pops up such error.
Just for Academic reasons, does anyone knows the reason why? I googled it but didn’t find any answer to the point .

ps
( * ) This mdb, is stored in a usb memory stick and i use it in my home laptop and at office pc.
I recently bought a new laptop, windows11, when i tried to compact and repair from office pc, no problem at all.
When i tried to compact and repair from home , new laptop (windows11), it just couldn't do it,
it was creating an emergency back up mdb document while the original document wasn't working / not open.
Only if i restarted my laptop, i could open again the original mdb. Now , in the new mdb, this error is over.
 

isladogs

MVP / VIP
Local time
Today, 21:57
Joined
Jan 14, 2017
Messages
18,239
USB stick are great for transporting files to another computer but you shouldn't run a database from the USB stick.
Far too easy to disconnect whilst in use and corrupt the files

Also any reason why you are still using MDB files?
 

Leo_Polla_Psemata

Registered User.
Local time
Today, 13:57
Joined
Mar 24, 2014
Messages
364
USB stick are great for transporting files to another computer but you shouldn't run a database from the USB stick.
Far too easy to disconnect whilst in use and corrupt the files

Also any reason why you are still using MDB files?
Hi, .accdb (not mdb, (.accdb)

I use memory stick because this is the most convenient, i work from office and home.,
Yes i know , there is a risk if disconnection but i can't find any other safe way to work.
That's why i am full with backups.
 

ebs17

Well-known member
Local time
Today, 22:57
Joined
Feb 7, 2020
Messages
1,949
Is the application split into frontend and backend? It should.
This way you can easily tell whether you are dealing with a data error (tables) or with faults in the VBA project (FE). A damaged frontend can be easily replaced with an original copy from the developer.
You have to be careful with the backend, for example no copying during ongoing access.
 
Last edited:

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:57
Joined
Sep 12, 2006
Messages
15,658
It's a bit late now, but if you try to fix a problem like this again, always, always take a windows copy before you try anything. Your recovery operations could easily fail and make things worse.
 

Leo_Polla_Psemata

Registered User.
Local time
Today, 13:57
Joined
Mar 24, 2014
Messages
364
Is the application split into frontend and backend? She should.
This way you can easily tell whether you are dealing with a data error (tables) or with faults in the VBA project (FE). A damaged frontend can be easily replaced with an original copy from the developer.
You have to be careful with the backend, for example no copying during ongoing access.
Hi, since i am the exclusive user, no , there isn't any FE, BE. I will implement this in 2023 db
 

Cotswold

Active member
Local time
Today, 21:57
Joined
Dec 31, 2020
Messages
528
That's why i am full with backups.
If this is the case, why not drop back to a sound backup. Presumably this unorthodox use of a USB stick for the database development means you haven't been just using one USB, if not two or three, so there must be several backups available?
If you must use a removable drive, why not buy a couple of SS drives? I have a 2TB that was only about £65, faster than a USB as well.
 

Users who are viewing this thread

Top Bottom