File Access denied on mdb, log off needed (1 Viewer)

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
Hi mates

This is need expert inspection. I have a .mdb (access02) serving as the BackEnd in a Server using winxp or win7. At times after a few session using it, i try to compact it but it refused to do so saying that db is used. When the mdb is opened, there is no .ldb file. Any file access eg renaming it flags Code 75 (Path/File access error).

In fact when this situation occur, opening any mdb file, the .ldb will not appear and that .mdb have no file access eg to rename. I presume other non mdb file access is ok.

HOWEVER, once i log off / on the pc that have these problem .mdb, the issue displayed.
Why is this happening, what did i do wrong to get to this state and how to avoid its occurence.??

:confused:
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:15
Joined
Feb 28, 2001
Messages
27,003
Access 02? Do you mean Access VERSION 2 or Access 2002? (Not even sure they MADE a version for that year, but please clarify.)

In any case, here is what you need either for WinXP or Win7.

The folder in which you have your back end requires you to have MODIFY access for the folder itself and all files in it. The inability to rename a file and the inability to create a .LDB file both point to directory protection problems since both of those actions require WRITE privileges on the directory as well as CREATE privilege in the case of creating the .LDB file. Compact & Repair ALSO require the ability to WRITE to a directory and to delete a file in the named directory. Which is why you need MODIFY-class permissions on both the directory file and the files therein.

As to how it got this way, even WinXP and Win7 have stable protections so the question has to be - what ELSE is going on?

What might also be a factor is that to get the "DB in use" message implies that someone is opening the BE exclusively. Which begs the question - does everyone use a separate FE file set up to open the BE in shared mode? OR is someone directly opening the BE file bypassing the FE? Because if the file is being locked while in exclusive mode and someone takes an abnormal exit from that mode, the file lock at least potentially might not be properly cleared, requiring at minimum your logout/logon sequence if not a full reboot.
 

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
Thanks friend, will check out your indepth advice. I was using OLD things ie Access in xp office 2002

Sent from my HTC_PN071 using Tapatalk
 

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
My dear Dr GrandPa

All that you say about giving full control for the folder & it content is noted. But i am sure that all FE user has full control as the problem does not happen most of the time. Any way in xpwin the security control is not extensive.

As to opening a file exlusively, i don't think there is any such event as i am the only user at the one pc with the BEnd & FEnd in the same PC. Moreover unless we want to do something special i don't open an .mdb exclusively.

That is why i am still foxed!
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 15:15
Joined
Sep 12, 2006
Messages
15,614
I think someone said that if you open a database EXCLUSIVE then you don't get a ldb file. I just tested this, and I didn't get a ldb file.

If access reports the file is in use, then it is in use. You could use task manager to see if there is a "phantom" msaccess running, and kill it. That would probably work.

Is this on a server, or on a local PC. Maybe someone else is using it. Maybe you have another process using it.
 

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
I will certainly look via task manager when it occur, thank you for the kind reminder that points to next action

Sent from my HTC_PN071 using Tapatalk
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 15:15
Joined
Sep 12, 2006
Messages
15,614
out of interest, why would you want to rename a back end database, in normal use?
 

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
I presume compacting a Mdb to its original name we need to Rename it first & compact the renamed to the original

Sent from my HTC_PN071 using Tapatalk
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:15
Joined
Feb 28, 2001
Messages
27,003
Actually, the Compact & Repair creates a file with a name similar to DB1.MDB and then when the C&R is done, in a few more steps it renames the older version to something else, renames the newer version to match the original name, and then deletes the (now renamed) version to get rid of it. So you do not need to rename anything before a C&R.

If you should choose to do something save, COPY the target DB to some other name, do the C&R on the COPY, and then when all else is done, change the original to DB_BACKUP_yymmdd.MDB (or some other thing like that, with a date tag) and rename the COPY (which has been C&R'd) to become the "new" version of the original.

Thus, during the C&R to the COPY, the original is untouched. Once the C&R is done, you can make that the new version and use the original as a backup copy. It is up to you as to how many backups you keep. I rarely kept more than about 4 or 5 depending on how often I did the C&R operation.
 

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
Thank You AGAIN

Sent from my HTC_PN071 using Tapatalk
 

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
Latest finding

When the msAccess FE using a BE .mdb foul up eg some unresolved codes, the task manager does not should that any msAccess is running or any existance of .ldb.
YET the mdb that was touched by the FE will have no file access until the PC containing the mdb is relog on.
 

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
Rephrasing the problem

Whenever a .mdb fouls up eg some unresolved codes in the FE, the task manager show no phantom access running nor is there a .ldb. This happen in xwpin & win7.

YET there is no file access to the particular mdb. All other mdbs are not affected.

Perhaps something is flagged by the OS to block file access. Only doing a re logging file access is allowed.

Is there a way to check this state? Is there another way to revert back to normal?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:15
Joined
Feb 28, 2001
Messages
27,003
The most common problem for the "need to log off" symptom is that a file lock is somehow left danging but it isn't visible to you. You don't see a file lock in the folder with the BE file. But have looked in the folder for the FE file to see if IT has a dangling .LDB?
 

HiTechCoach

Well-known member
Local time
Today, 10:15
Joined
Mar 6, 2006
Messages
4,357
FYI: There was a relase of Ofcice 2002 for Windows. It has an update for Windows XP compatibility. It was replaced with Office 2003.

FuzMic,

Verified with Access 2.0/95/72/2000/2002/2003
What you are describing happens when a recordset is opened in VBA code and not properly closed. This is often caused by a bug in the VBA code that that causes a duplicate instance to be created.

I learned this from the experience of debug some Access applications many years ago.

I have been able to duplicate the issue in the above listed versions of Access.

Running the "buggy" VBA code in Access 2007 and later does not cause the same issue.
 

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
Doc you may be just right; a dangling recordset is still opened at the front end, will certainly double checked that.

HiTechFriend great mind think alike, will double checked it is a recordset not set to nothing. I hope i can see the ldb in the front!!
 

HiTechCoach

Well-known member
Local time
Today, 10:15
Joined
Mar 6, 2006
Messages
4,357
HiTechFriend great mind think alike, will double checked it is a recordset not set to nothing. I hope i can see the ldb in the front!!

This is not what I was referring too, but still a good thing to check.
 

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
Still maintain non accessible Mdb is hung up by the OS file sysyem as there is no running recordset, no ldb, nor phantom MS Access at FE or BE: back to square one

Sent from my HTC_PN071 using Tapatalk
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:15
Joined
Feb 28, 2001
Messages
27,003
With no active Access images at FE or BE, there is only one thing that I can imagine. When a process exits with open file handles, the Window process manager attempts to close all open handles in a code related to "process rundown." When a process is in this state, the ordinary Windows Task Manager utility will not display the task. However, if something is preventing the task from exiting, it hangs in the rundown state.

FuzMic, does your application have ANY code that is capable of returning a Cancel to a Form_Unload event? And if so, would that Cancel be issued under the circumstances you are seeing now? Finally, would the form that has this feature be minimized or invisible at the time?
 

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
Quick thank you first, chew on it later

Sent from my HTC_PN071 using Tapatalk
 

FuzMic

DataBase Tinker
Local time
Today, 23:15
Joined
Sep 13, 2006
Messages
719
Doc, there is no hidden form as msaccess is not running at all. It has to be a file system issue as it does not allow anything to do with the .mdb (only the particular one & not all).

At times a log off don't work, i need to do a shut down.
Also a chkdsk on the drive holding the mdb shows no problem

May be it is all about a faulty OS, mainly xpwin.sp3. In win7 this may occur if there is no sp1, i hope that is the cause.
 

Users who are viewing this thread

Top Bottom