[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Microsoft Office Access can't open the database because it is missing, or opened exclusively by another user

Posted on 2010-08-17
3
Medium Priority
?
888 Views
Last Modified: 2013-11-27
I get this error when I try to open an access database and run a macro from vb.net: "Microsoft Office Access can't open the database because it is missing, or opened exclusively by another user."

I have searched high and low for a solution.  It went away for a few times, now it is back and I have no idea why.  My research tells me it might be a security issue on the server, though I get the error whether I run it on a local datbase or a network database.  Any ideas?
RunPickAccessMacro ("test")
Private Sub RunPickAccessMacro(ByVal sMacro As String)
        Dim oAccess As Access.ApplicationClass
        Try
            oAccess = CreateObject("Access.Application")
            oAccess.Visible = True
            oAccess.UserControl = True
            oAccess.AutomationSecurity = 1
            'oAccess.OpenCurrentDatabase("\\mwwnas1\mwwnas1f\mis\Projects_Prod\PickTick\pickticket97_test2.mdb;", False, False)
            oAccess.OpenCurrentDatabase("c:\test.mdb;", False, False)
            oAccess.DoCmd.RunMacro(sMacro)

            'Clean-up: Quit Access without saving changes to the database.
            oAccess.DoCmd().Quit(Access.AcQuitOption.acQuitSaveNone)
            System.Runtime.InteropServices.Marshal.ReleaseComObject(oAccess)
            oAccess = Nothing


        Catch ex As Exception
            sErrNo = Err.Number.ToString
            sError = "**Macro" & vbCrLf & Err.Description & " " & "ErrNo: " & sErrNo
            dispError(sError)
        End Try
    End Sub

Open in new window

0
Comment
Question by:Delta7428
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
uscshaggy earned 1200 total points
ID: 33456209
I would suggest downloading Process Explorer from MS/sysinternals, http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx which you can use to see which process(es) have a handle open for a particular file.  When you encounter this error again, run ProcessExplorer.exe and use Ctrl+F to search for your database name (test.mdb). It should find the process that is currently accessing the file.  I would guess it is an AV product, but this will show you for sure.  

Once you identify the process that is has the file open, shut that other process down, or put in exclusions for your database if it is an AV or HIPS product.
0
 
LVL 6

Assisted Solution

by:rbgCODE
rbgCODE earned 800 total points
ID: 33458139
Have you tried opening the database passively instead of with strict permissions?  
0
 

Author Comment

by:Delta7428
ID: 33458164
yes, I added permissions hoping it might help.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I don't pretend to be an expert at this, but I have found a few things that are useful. I hope that sharing them here will help others, so they will not have to face some rather hard choices. Since I felt this to be a topic of enough importance and…
IF you are either unfamiliar with rootkits, or want to know more about them, read on ....
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question