Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Handling "Not a valid bookmark." error with corrupted records

Tags:

vba

ms-access

I have a database that has some corrupted records. When looking at the table within Access the records display with "#Error" in the fields. At the same time a dialog box pops-up with "Not a valid bookmark.". While processing these records in some VBA code I get the same error (error number is 3159). My question is this: How can I detect these corrupted records within VBA? Can I do this without trapping that particular error? Is there a way using SQL that I can delete these records? I tried "compact and repair" and it didn't touch them.

like image 496
GeezerGeek Avatar asked Oct 09 '22 12:10

GeezerGeek


2 Answers

I tried to delete the offending records using VBA without success. The records remained after the code deleted them. I was able to work around this by manually deleting one record and then using "compact and repair". This is what I'll have to do for the customer, I guess. Thanks, everyone.

like image 101
GeezerGeek Avatar answered Oct 12 '22 12:10

GeezerGeek


In the case of corrupted database, IMO, the best solution is to create an new empty database, and import all the objects from the corrupted one.

like image 28
iDevlop Avatar answered Oct 12 '22 12:10

iDevlop