Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Exclusivity issue

Discussion in 'Information Technology' started by Tom, Jul 28, 2006.

  1. Tom

    Tom
    Expand Collapse
    Guest

    Hi all,

    On a form I have a button that run this:(This is part of the sub)
    Call DBEngine.CompactDatabase(srcFileName, destFileName)

    My DB is split and the command above runs on the BE from the FE.

    When I try to run it from FE, I get error message that the user opened the
    database exclusivly and the sub stop.
    When I start the FE with shift and I run it from the form, it's fine.

    What has to be done in order to fix this?


    I hope I'm clear.

    Thanks for the help,

    Tom
     
  2. Loading...

    Similar Threads Forum Date
    My Story Printed in Sikh Review Sept 2015 Issue Convert's Corner Oct 19, 2015
    Religion and Haircut Issue... Questions and Answers Jul 12, 2015
    URGENT PLZZ HELP: KAAM LUST BODY MASSAGE SPA ISSUE Sikh Youth Jul 9, 2015
    Nature NGOs request Akal Takht to take up the issue against GM crops Breaking News Apr 1, 2014
    India AAP hijacks SAD's traditional Sikh issues Breaking News Mar 29, 2014

  3. Tom Wickerath

    Tom Wickerath
    Expand Collapse
    Guest

    Hi Tom,

    When you run it from your front-end, I strongly suspect that you need to
    close any open connections. Usually, maintaining a permanent connection to
    the BE database is a very good thing to do. However, in this case, I believe
    you would need to close any open connections prior to running your code from
    the FE database. To verify closed connections, you should not see a locking
    database file (*.LDB) for the BE database.

    Do you have any forms open at the time that are bound to a table in the BE
    database? If not, do you have a global recordset open? Me thinks that by
    opening the database with the shift key down, you are preventing such a
    connection from being established, so your code works just fine.


    Tom Wickerath
    Microsoft Access MVP

    http://www.access.qbuilt.com/html/expert_contributors.html
    http://www.access.qbuilt.com/html/search.html
    __________________________________________

    "Tom" wrote:

    > Hi all,
    >
    > On a form I have a button that run this:(This is part of the sub)
    > Call DBEngine.CompactDatabase(srcFileName, destFileName)
    >
    > My DB is split and the command above runs on the BE from the FE.
    >
    > When I try to run it from FE, I get error message that the user opened the
    > database exclusivly and the sub stop.
    > When I start the FE with shift and I run it from the form, it's fine.
    >
    > What has to be done in order to fix this?
    >
    >
    > I hope I'm clear.
    >
    > Thanks for the help,
    >
    > Tom
    >
    >
    >
     

Share This Page