I have created a service in C#. The service loads a COM dll (it uses OLE DB classes) on startup which handles the database connectivity part (SQL server). When I startup the service it works fine for a local database but when the database is remote the Open fails with an error. The exception that is written into the Event Log is as follows: "[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied." "System.Runtime.InteropServices.COMException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. To zero-in on the problem I ported the Database related code into a separate exe and found that it works fine. SO this problem seems specific to a Service. I am running the service logged is as a System Administrator and given full access to it at the Remote server. Has anybody faced this problem before. Pls help. Coding is injurious to health!!
R
rishikt
@rishikt
Posts
-
windows service and SQL related problem -
call unmanaged ActiveX method from C#Hi to all, I have a requirement to call methods of an unmanaged ActiveX control (MFC ActiveX 6.0) from C#. The solution is straightforward if my application is GUI based, but my application has no GUI. Can anyone give me an idea of how to go about this. Thanks, Coding is injurious to health!!