Is is possible to store username/password with the ODBC DSN?

26538 views
Skip to first unread message

Tommy Hayes

unread,
Nov 15, 2007, 10:50:47 AM11/15/07
to
Hello all,

Is there any way to specify a default username and password in ODBC
DSN settings? Perhaps by a manual registry edit?

Up to now we've been using Windows Authentication to connect to the
database so username and passowrd weren't an issue. However we now
need to change over to native SQL Server authentication, and so either
we find a way to pass the username/password automatically or we have
to change the code in a number of applications to pass it manually.
We'd prefer the automatic way :)

Many thanks,
Tommy.

Pak-Ming Cheung [MSFT]

unread,
Feb 13, 2008, 4:06:04 AM2/13/08
to
For security purpose, we don't store password in ODBC DSN settings.
Therefore, there is no way to automatically login except "trusted connection".
It is recommended to use "trusted connection", if it is possible.

Thanks,
Ming.
MDAC Team, Microsoft.
====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Pak-Ming Cheung [MSFT]

unread,
Apr 22, 2008, 10:21:00 PM4/22/08
to
After more investigation, file DSN can store password information. You can
add a line "PWD=xxxx" in the file DSN. However, for secure purpose, it is not
recommended to store the password in plain text. Or you have to make sure the
file DSN is porperly secured by windows ACL.

Thanks,
Ming.
MDAC Team, Microsoft.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.

pnolan....@gmail.com

unread,
Aug 17, 2012, 5:08:23 AM8/17/12
to
On Wednesday, 23 April 2008 03:21:00 UTC+1, Pak-Ming Cheung [ MSFT ] wrote:
> After more investigation, file DSN can store password information. You can
> add a line "PWD=xxxx" in the file DSN.

Hi, where exactly do I add this line?

pnolan....@gmail.com

unread,
Aug 17, 2012, 6:28:36 AM8/17/12
to
Got it! :) "File DIN" tab.
Reply all
Reply to author
Forward
0 new messages