Hi all,
when I´m trying to open SQLConnection on app running as NT Service raises this error: Cannot access database. Please check databasename and net-connectivity OLE DB error occured. Code 800401F0h.
CoInitialize has not been called.
When the same app runs as an Exe I have no problems. Besides DBX-Connection with Borlands MSSQL-DBX-Driver that comes with D7 works.
I´m using D7 and dbexpsda.dll Ver 2.00 (tried also Ver 2.00.3), MSSQL 2000
Have you any advise what can be wrong ?
thanks
Andy
Problems access DB in services
Re: Problems access DB in services
If you would like to use DbxSda in service, console or just at separate thread you need call CoInitialize for each thread. Also remember to call CoUnInitialize at the end of thread.