Puzzle - "Cannot start your application"

I've run a comprehensive staff db on the network for 2 years using MS Access 97 backend and VB6 front end. Every now and then I update the code and recompile the executable. Always been working fine. I did some amendments yesterday, only changing some filepaths on the connection strings.

When I try it from within VB6 (F5) it work fine. However, when I compile the executable and trye the exe file from the SAME PC I get the following error:

Run-time error '-2147217843(80040e4d)':

Cannot start your application. The workgroup information file is missing or opened exclusively by another user.

Yes, I have checked and tried that the file is not opened exclusively by another user. In Access, the default open mode is set to "Shared".

Any help would be much appreciated.

Who is Participating?
bingieConnect With a Mentor Commented:
A request has been made to have this question paqed; if there are no objections within 4 days, this request will be granted.

Page Editor
Experts Exchange
Do you have the complete paht to your database in code ? Because sometimes app.paht is different from the path where the database is set !
PedercsAuthor Commented:
I don't use App.Path at all, only complete pathnames:
"PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=\\some_drive\folder1\folder2\MSAccessDB.mdb;Jet OLEDB:Database Password=123456;"
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Does it make a difference if you add a username to your connectionstring ?
Does your windows-user have rights on that share where the database is located ?

Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source=c:\somepath\mydb.mdb;" & _
           "Jet OLEDB:Database Password=MyDbPassword", _
           "myUsername", "myPassword"
PedercsAuthor Commented:
They all have the right access, besides it even bugs out when I use the exe file on MY computer, although it works fine from within VB6 (F5). Thanks for your efforts!
PedercsAuthor Commented:
One of the things I do in the applicaiton is verify the username against the windows login username.

I used
with the "advapi32.dll" api

Turns out this sequence muck up something when authenticating the use of the database, although the username of the user remains the same. The whole problem was solved by removing RevertToSelf and ImpersonateLoggedOnUser.

As I solved it myself (for a change) i will close the question down.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.