Results 1 to 9 of 9
  1. #1
    pdanes is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    Sep 2019
    Posts
    208

    laccdb file when started by automation

    I have a database that writes out an HTA file, executes the file and kills itself.

    The HTA file does some work, then restarts the spawning database and kills itself.

    Most of this works well - I use loops to monitor status of the file system and decide when I can go on to the next task. For instance, the very first thing the HTA does is watch for the disappearance of the laccdb file of the database that fired it off. When that disappears, it knows that the spawning database has fully finished closing and it is safe to go on to the next step.

    The last task, restarting the spawning database, executes properly, but I put a final step into the HTA, of looking for the appearance of the laccdb file, to know that the original database has properly started up, and the HTA may go off to the happy hunting grounds, knowing that everything concluded successfully.

    Unfortunately, that last step is failing, and watching the folder containing all this reveals that the laccdb file truly does not appear. I naturally spent the first few minutes thinking evil thoughts about Microsoft, but upon further review of the role of the laccbd file, it occurrs to me that this may be in the "feature not bug" category - that is, the laccdb file is created only when the database is manually opened by a user, and when it is spawned by another process, via automation, there is no 'user' and so there is no laccdb file.

    Can anyone shed some light on this? I looked around, but found nothing about the laccdb file not appearing.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    What is the code to open db?

    I tested programmatically opening db with FollowHyperlink and laccdb is created.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    pdanes is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    Sep 2019
    Posts
    208
    Quote Originally Posted by June7 View Post
    What is the code to open db?

    I tested programmatically opening db with FollowHyperlink and laccdb is created.
    Here are the pertinent parts:
    Code:
    Dim sh
    Const AktivniSlozka = "C:\Users\danespe\Desktop\LichTest\"
    Set sh = CreateObject("wscript.shell")
    sh.Run AktivniSlozka & "Lichen.accdb /excl", 1, False

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    A lock file isn't created when an ACCDB is opened exclusively. Change the default open settings for that database by removing the /excl switch in your code.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Tested your code. Works. Removing the switch does allow the laccdb.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    pdanes is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    Sep 2019
    Posts
    208
    Quote Originally Posted by isladogs View Post
    A lock file isn't created when an ACCDB is opened exclusively. Change the default open settings for that database by removing the /excl switch in your code.
    All these years and I never knew that. I just copied that line from somewhere without investigating it. Thanks.

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    You're welcome.
    Its always seemed illogical to me that no lock file is created when opened exclusively.
    How does Access know the file is already open to prevent others opening it subsequently.
    No doubt something obvious that I'm unaware of.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Some deep hidden table?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    No. Deep hidden tables are only used as attached tables for complex datatypes such as MVFs.
    Possibly a database property.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. laccdb on BE file
    By enilc in forum Access
    Replies: 5
    Last Post: 03-15-2022, 03:59 PM
  2. Replies: 4
    Last Post: 02-06-2022, 07:27 PM
  3. why does the backend *.laccdb file linger?
    By markjkubicki in forum Programming
    Replies: 6
    Last Post: 02-09-2018, 08:29 AM
  4. LACCDB file won't delete
    By ranman256 in forum Access
    Replies: 4
    Last Post: 05-17-2016, 08:10 AM
  5. *.laccdb file stuck
    By jessmith07 in forum Access
    Replies: 4
    Last Post: 03-16-2012, 08:32 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums