Solved

Puzzle - "Cannot start your application"

Posted on 2004-09-28
6
1,322 Views
Last Modified: 2013-12-25
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.

Peder
0
Comment
Question by:Pedercs
  • 3
  • 2
6 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 12168500
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 !
0
 
LVL 1

Author Comment

by:Pedercs
ID: 12168576
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;"
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 12168601
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"
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 1

Author Comment

by:Pedercs
ID: 12168826
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!
0
 
LVL 1

Author Comment

by:Pedercs
ID: 12171693
Solution:
One of the things I do in the applicaiton is verify the username against the windows login username.

I used
RevertToSelf
LogonUser
ImpersonateLoggedOnUser
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.
0
 
LVL 11

Accepted Solution

by:
bingie earned 0 total points
ID: 12174126
A request has been made to have this question paqed; if there are no objections within 4 days, this request will be granted.

Bingie
Page Editor
Experts Exchange
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ms access #TYPE! error on report when no data 4 75
Access 2016 VB code 9 115
How to hault or freeze parent form when a 2d form is open in vb6 3 37
VB6 ListBox Question 4 43
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 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