Re: Automate ODBC DSN Setup
- From: "JP" <someone@xxxxxxxxxxxxx>
- Date: Mon, 15 Aug 2005 15:41:47 -0400
Mary,
Thanks for the direction. It would be useful for writing new applications
which connects to a database. In the meantime, I have to deal with a
situation where I have to set up a vendor supplied application which
required ODBC configuration on the client PC's. I have to either configure
it manually by going to each terminal, open up Control Panel, Admin Tools
then ODBC Data Source, or do it using a script.
If I use a VBscript, I can set up most everything except for the password
part. That's frucstrating.
Joe
"Mary Chipman [MSFT]" <mchip@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:2jb1g1pk2tmkreua8h200ogt3vbudhlj5t@xxxxxxxxxx
> Why not just do away with DSNs entirely and just supply an ODBC
> connection string in your code? You can find examples at
>
http://www.carlprothman.net/Technology/ConnectionStrings/ODBCDSNLess/tabid/90/Default.aspx.
>
> Storing user names and passwords on the client is not something that
> you should do, especially for administrative accounts like sa (which
> you should never use anyway). There just isn't a secure way to do it.
> Here is an article on storing encrypted connection strings in the
> registry for ASP.NET applications:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT11.asp.
>
> --Mary
>
> On Sun, 14 Aug 2005 20:43:34 -0400, "JP" <someone@xxxxxxxxxxxxx>
> wrote:
>
> >I have been thinking of using VBscript to automate the set up of the ODBC
> >DSN entries. There are some discussions on the Internet that I can find.
> >Unfortunately, none of them gives me any hints on how I can store the
> >username (such as sa) and password for the connection.
> >
> >I know I can use VBscript to modify the registry or simply importing the
> >.REG files which I exported from a manually created DSN entry. Here is
the
> >key to be modified:
> >
> > HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\
> >
> >Although I can manually create a new DSN and stored the password (through
> >Control Panel or by running ODBCAD32), I can't find the password in the
> >registy. Anyone has a good suggestion?
> >
> >Joe
> >
> >
>
.
- Follow-Ups:
- Re: Automate ODBC DSN Setup
- From: Mary Chipman [MSFT]
- Re: Automate ODBC DSN Setup
- References:
- Automate ODBC DSN Setup
- From: JP
- Re: Automate ODBC DSN Setup
- From: Mary Chipman [MSFT]
- Automate ODBC DSN Setup
- Prev by Date: Re: Automate ODBC DSN Setup
- Next by Date: linked table manager
- Previous by thread: Re: Automate ODBC DSN Setup
- Next by thread: Re: Automate ODBC DSN Setup
- Index(es):
Relevant Pages
|
|