Dr Watson error

Crispy

Registered User.
Local time
Today, 23:03
Joined
May 28, 2002
Messages
43
In one of my tables, there is a field named 'Brand'. This should only ever be one of two text values.

Somehow, in a couple of records, the data in this field has chenged to "ÿÿ/ý*" or similar. I have tried to delete this and enter the correct information, but when I try, it produces a Dr Watson error and dumps me out of Access. (I've tried doing the change in Table view, form view, datasheet view, and via an update query, but same result).

The Dr Watson text is Exception: Access violation (0xc0000005), Address: 0x0400689b

Any ideas a: why this is happening; b: how to clean up the data; and c: how to stop it happening in the future?

PS I have tried repairing and compacting the db but to no avail.

Thanks for any advice you can give,
 
Basically, OUCH!

If repair doesn't help and compress doesn't help, you have a database that is internally corrupted. The "access violation" sounds like one of the internal table pointers used by Access to find things has become fried. It now points to somewhere off the end of the MDB file. This situation is, of course, definitely Not Good.

Make a new, empty database. Try to import each object from the old database file to the new one. One at a time, if necessary. One of the objects will probably not import correctly. Import everything you can and do your best to reload whatever part you can from the object that won't import correctly. Check old reports to manually enter whatever else you can.

Next time, remember to make backup copies every so often. That way, you will be able to recover information in case of another failure like this one.

You should also search the MS Knowledge Base for info on Access Violations in MS Access to see if they report anything with that address as the culprit. Odds are, though, that a previous "Compress" operation failed or a previous "Update" failed. You don't say whether this is a local or a shared DB, but if shared, it is possible for the server's device driver to have logged an error for that file and your workstation wouldn't see it. You are looking at a failed write operation but details beyond that are anyone's guess.
 
Thanks for the comprehensive response.

Everything imported to the blank DB fine, and it now seems to be working like a charm. Fingers crossed.
 
Glad to help. But a question... don't you find it hard to type with your fingers crossed? :D
 
Why not just delete the record and re-add it?

That's a fair enough question. Here's my best answer.

Access works internally by defining file-relative POINTERS within the DB. These pointers ... well... POINT to data records of various types. When you get an Access Violation (other use of word 'access' in this case) it is because Access tried to adjust the pointer information so you can generate the address to actually read the record - but the pointer is bad. It leads to a place outside the DB file - hence the violation. Which means you cannot delete it because Access cannot touch it. Can't get there from here.

So the solution I suggested - which Crispy says worked OK - was to copy everything else to a new DB. The things that wouldn't copy with this method were lost anyway. But when you do an import like this from one .MDB to another, you cannot copy a bad pointer so you cannot CREATE a bad pointer.

From the sound of it, whatever was bad wasn't in use anyway, but it was part of his particular corruption that the violation occurred when Access tried to do something that required it to find something by scanning memory. I SUSPECT that it was a corrupted pointer to deleted data that SHOULD have been fixed by repair followed by compaction - but Crispy says that didn't work right. The usual next step is import to a new DB file.

See, Access can't delete what it can't find or touch, but in this case Access not only couldn't find it, it couldn't complete the ACT of trying to find it due to the Access Violation that popped up. So while many of us agree with you, why not just delete it..., and many of us wish we really could do that and be done with it, Access ain't smart enough to get around that problem. I see that you, too, are having corruption problems based on another post. I'm not sure I have an answer for that post.

Oh, a critical part of this is knowing that it was not Access that detected the Access Violation. It was the hardware of the CPU itself. Access was out of the picture the moment it tried to use that bad address. So if Access is no longer in control, it cannot complete the operation. And anything that was pending at the time might be a source of secondary corruption.
 

Users who are viewing this thread

Back
Top Bottom