If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > How do you get an NT Service to connect to SQL Server using a DSN

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-26-03, 09:37
Schimelcat Schimelcat is offline
Registered User
 
Join Date: Oct 2003
Posts: 37
Smile How do you get an NT Service to connect to SQL Server using a DSN

Hello all,
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.
Regards !
Tammy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On