?
Solved

Microsoft Jet Database Engine cannot open file ",

Posted on 2011-09-15
7
Medium Priority
?
260 Views
Last Modified: 2012-06-21
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
Comment
Question by:pmac38CDS
[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
  • 4
  • 2
7 Comments
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
ID: 36547948
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
 
LVL 1

Author Comment

by:pmac38CDS
ID: 36548565
The XP  user gets the same error when he tries it even though I have stopped using the exe.

Thanks,
Aditya
0
 
LVL 28

Expert Comment

by:strickdd
ID: 36549070
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:pmac38CDS
ID: 36550826
I am opening and closing the connection everytime the  Jet Engine is called.

Thanks,
Aditya
0
 
LVL 28

Expert Comment

by:strickdd
ID: 36550876
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
 
LVL 1

Accepted Solution

by:
pmac38CDS earned 0 total points
ID: 36556271
I got around the problem by not using the Jet Engine.
0
 
LVL 1

Author Closing Comment

by:pmac38CDS
ID: 36585501
I got around the problem by not using the Jet Engine.

Thanks,
Aditya
0

Featured Post

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.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

777 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