DSN and password

Results 1 to 2 of 2

Thread: DSN and password

  1. #1
    Join Date
    Dec 1969

    Default DSN and password

    I see a lot of talk about DSN and DSN-less regarding performance. I have another question.<BR>Is the purpose of using a DSN, so that you do not need to specify the username and password for the database?<BR>I was told this is why you use a DSN and had one set up, however I am doing the following:<BR>oConn.Open "mydsn"<BR>and receiving the following error:<BR>Login failed for user &#039;(null)&#039;. Reason: Not associated with a trusted SQL Server connection.<BR>if I do the following:<BR>oConn.Open "mydsn", "userid", Userpwd"<BR>this works fine. Do I need to hard code the<BR>username and password for a database connection or is this dsn no set up correctly?<BR>thanx <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: DSN and password

    As far as I understand DSN, it is basically only a "shortcut" or "alias" to the database. It saves you have to pass the full path name when opening a connection. I don&#039;t think it helps you with password proctected databases. You still need to pass the correct username and password to get a connection.<BR><BR>Hope this helps,<BR>Oliver.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts