Wednesday, May 05, 2010

Access database can't be accessed

There's a simple shared database sitting on a computer, accessed via a simple front-end in Access 2000. I go to access it this afternoon and it states that it's not accessible - it's either exclusively locked or security blocked.

I navigate to the UNC where it's stored and try to open the table itself, no can do. I try to take a copy to check it locally - nope. I try one of the other tables stored in the same place - fine. So it's not the share or network security.

So I ask myself one of the basic IT support questions "What was the last thing I did with it?" and the answer pops up - I compacted and repaired it. "Where did I do that?" on the local computer. Why should that make a difference I don't know.

I can't open it remotely so I go back to the local computer, open the file and compact and repair; still not accessible remotely. This time I open the file using the network UNC location; compact and repair - bingo.

My guess is a compact and repair embeds the file location of the lock file that's created when the table is accessed. When opened remotely it uses that rather than the path it was opened from to locate the lock file. Of course the remote computer doesn't have a lock file at c:\user\users\files\database\ it's at \\computer\database\ so it fails.

0 comments: