• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

Microsoft Jet Database Engine cannot open file ",

I have a Windows form application installed on my development server. When I run the exe(using a network path) from my machine(Windows 7) it runs fine. However when another user(running Windows XP) runs it from his machine he gets the following error
Microsoft Jet Database Engine cannot open file ", It is already opened exclusively by another user or you need permission to view this data.
I have checked and the msjet40.dll exists on both machines.

Any ideas why this could be happening,
Thanks,
Aditya
0
pmac38CDS
Asked:
pmac38CDS
  • 4
  • 2
1 Solution
 
Easwaran ParamasivamCommented:
Well. You are running the exe. Please Stop using the EXE or kill the process from your task manage. So that other person could open the same.
0
 
pmac38CDSAuthor Commented:
The XP  user gets the same error when he tries it even though I have stopped using the exe.

Thanks,
Aditya
0
 
strickddCommented:
Since you are running from a windows share, it means that the database is being shared by everyone running the application. If you turn off the Windows 7 box, it will force the connection to close and the XP machine should be able to run the app and connect to the DB.

If this does work, and you need the application to run on both computer simultaneously, it means that the application has an open connection to the database that needs to be closed in order to allow another instance to connect. Check the code and make sure to use the following structure:

1. Open Connection
2. Execute Query
3. Close Connection
4. Dispose of objects (optional)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
pmac38CDSAuthor Commented:
I am opening and closing the connection everytime the  Jet Engine is called.

Thanks,
Aditya
0
 
strickddCommented:
Then I would recommend finding out what process has a lock on the file (http://windowsxp.mvps.org/processlock.htm).

Did you try restarting the Windows 7 machine and using JUST the XP machine?
0
 
pmac38CDSAuthor Commented:
I got around the problem by not using the Jet Engine.
0
 
pmac38CDSAuthor Commented:
I got around the problem by not using the Jet Engine.

Thanks,
Aditya
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now