How do you get an NT Service to connect to SQL Server using a DSN
I've got an application that I'm migrating from Access to SQL Server. The application has two NT Services that run continually in the background.
The current method of connection grabs the datasource name from the registry, initializes the datasource and the connection is made. Since it's an Access datasource, the user id & password are not required or used.
This method obviously fails with SQL because it does require the userid and password.
I have found only two ways to get the connection to the datasource to work:
1) put the user id & password in the registry so it gets passed when the request is made; or
2) don't use a Datasource and put the connection string in the code.
I would greatly appreciate an alternative method if anyone out there knows of any other way.