|
-
May 14th, 1999, 08:39 PM
#1
ADO and NT Service
Anyone used ADO with an NT Service?
This code fails when I run it as a service:
_ConnectionPtr db;
hCreate = db.CreateInstance( __uuidof(Connection) );
Any ideas?
-
May 24th, 1999, 07:46 AM
#2
Re: ADO and NT Service
Have you turned on OLE with:
// Initialize OLE.
::CoInitialize(NULL);
Bob
-
May 24th, 1999, 08:52 PM
#3
Re: ADO and NT Service
Remember that a service starts without an active user on the box, so if your service talks to a database that requires authentication (like SQL Server) you must supply a valid NT user account to the service when it starts. Go to Services and under the Startup settings for your service, set "Log On As:" to "This Account" and supply an NT user account and password that is authorized to access your database.
-
May 28th, 1999, 10:38 AM
#4
Re: ADO and NT Service
Yes I hav used with NT and it works fine. Make sure you have initialized OLE by CoInitialize();
mahesh
-
May 31st, 1999, 12:54 AM
#5
Re: ADO and NT Service
If there are other services that your service uses (e.g. MSSQL service) then they should
be started first. CreateService(or whatever...) takes a list of dependent services.
-
May 19th, 2000, 12:45 PM
#6
Re: ADO and NT Service
Can you send me the code?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|