Re: Automate ODBC DSN Setup



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
> >
> >
>


.



Relevant Pages

  • Re: creating odbc dsn with c#
    ... add the appropiate registry entries for the DSN. ... Create a new DSN with your desired properties via the control panel ... uses ODBC DSNs to connect to multiple access databases. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Inno User Input Form and ODBC DSN
    ... DSNs are strictly registry entries. ... why bother with a DSN? ... It is an ODBC System DSN. ... > login, Password, and Database. ...
    (microsoft.public.vb.general.discussion)
  • Re: Inno User Input Form and ODBC DSN
    ... DSNs are strictly registry entries. ... why bother with a DSN? ... It is an ODBC System DSN. ... > login, Password, and Database. ...
    (microsoft.public.vb.database)
  • RE: Automatically refresh ODBC linked tables at satrtup
    ... Does the ODBC data source exist on the new PC before the user opens the ... Access database? ... If not, the problem may be the absence of the DSN, and not the link itself. ... I simply export the DSN from the registry of a PC that is all set up and send ...
    (microsoft.public.access.modulesdaovba)
  • Re: Word 2000/2002 - Proper Mail Merge steps for ODBC?
    ... > Document to connect to a Secured Access Database, ... using the ODBC provider for OLEDB. ... they have a .dsn extension. ... directly (in the Open/Select Data Source dialog box). ...
    (microsoft.public.word.mailmerge.fields)