Application error on windows startup only.

  • Thread starter Thread starter davet
  • Start date Start date
D

davet

Hello,
I'm running into a strange problem getting my application up and
running with Embedded XP. I'm not sure were exactly the problem is so
I'm hoping someone can at least point me in the right direction.

Here's the situation. I have an Embedded XP working fine. The
application will run perfectly if started manually. But if I put it in
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" then
the application throws the following error: "ExecuteReader requires an
open and available Connection. The connection's current state is
Closed." The application is attempting to accessing a mdb using Jet and
OLEDB at that point.

If I put a shortcut to application in the startup folder it starts up
fine. Which worked great until I decided to try and make the
application act as the shell, now I'm having the same issue.

I'm guessing this must have something to do with system versus user
permissions or something like that.

Thanks for any help you can give.

-Dave
 
It might be a timing issue, application/shell trying to load before services
are up and running. You might want the app to wait for the database service
to start before running.

Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
XP Embedded Book Author - XP Embedded Advanced, XP Embedded Supplemental
Toolkit.
 
I thought that too, but I changed the application to wait 5 seconds
before attempting to open the connection and I got the same error.
Additionally I wrote another quick application to launch the original
one. I had the delay up to 60 seconds before I stopped and decided
there must be something else causing this.
 
Just to follow up on the solution to this problem.

Apparently when launching a program as a shell or via the run in
registry, windows assume the working drive for that program is the C
drive (or probably just what ever drive windows is on). So I was able
to fix the problem by telling it exactly where the database was (on the
D drive).
 
Back
Top