ADO and Win32 Services
From: me (me_at_me.me)
Date: 03/22/05
- Next message: Michael M.: "Add Row to Dataset"
- Previous message: Daniel Crichton: "Re: Parameters in INSERT query problem"
- Next in thread: Ross McKay: "Re: ADO and Win32 Services"
- Reply: Ross McKay: "Re: ADO and Win32 Services"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 22 Mar 2005 16:17:17 +0200
Hi everyone,
I've wondered across a peculiar issue with ADO (although something else
could be the culprit, but through my investigation, I believe it to be ADO).
I have written a service that uses ADO. When running the service as a
console app, everything works great. However, when the service is run 'as a
service' in the SCM, I find a problem with the connection.
Basically, this is what I've found to happen:
1. I issue a connect() call, and it returns S_OK.
2. Immediately after that, I execute a simple query, say "select count(*)
from table1". At this point, when running as a normal app, the query
executes and all is well. However, as a service, the query fails. Upon
further inspection, doing a check on whether the connection is actually
"connected", I find that it is infact disconnected.
Any ideas? I've been thrashing my brains with this problem for a few hours
now. Maybe someone can shed some light on this?
I have tried changing the account under which the service runs. That didn't
work. I tried testing different data providers. Same problem. Anything else
I can try?
Thanks,
Peter
- Next message: Michael M.: "Add Row to Dataset"
- Previous message: Daniel Crichton: "Re: Parameters in INSERT query problem"
- Next in thread: Ross McKay: "Re: ADO and Win32 Services"
- Reply: Ross McKay: "Re: ADO and Win32 Services"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|