Solved

programatically install an ODBC entry including password?

Posted on 2014-02-07
5
384 Views
Last Modified: 2014-03-17
Hi

I can easily use the ODBC control panel in Windows to setup an ODBC connection, including the entry of a password followed by the "test connection"..   I'm referring to SQL Native Client 10, and SQL Server Authentication mode.

I know how programmatically (VB/C#/C++) add an ODBC entry to the registry, but this doesn't include the password.

Is it possible to write a small program (compiling the password into the code) that will setup the ODBC registry entry and add the password? This is a utility app for some service folks and I want them to be able to configure and verify the ODBC connection without having to inform them of the password.

Can this be done?

Thanks
0
Comment
Question by:PMH4514
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 33

Expert Comment

by:Big Monty
ID: 39842140
according to this thread, this cannot be done due to the fact that it is very insecure.
0
 

Author Comment

by:PMH4514
ID: 39842163
But if the windows API can do it (ie. the ODBC tool in Admin Tools) certainly there must be a way I can make a program do the same thing?  (how would anybody ever make a program installer that uses ODBC if this wasn't possible?)
0
 
LVL 18

Accepted Solution

by:
Dennis Aries earned 250 total points
ID: 39874791
http://stackoverflow.com/questions/334939/how-do-i-create-an-odbc-dsn-entry-using-c might be what you are looking for. Very extensive class but easy to use.
0
 

Author Comment

by:PMH4514
ID: 39874811
Thank you I will look into this.
0
 

Author Comment

by:PMH4514
ID: 39882416
That is an interesting class, but unless I'm missing something, it still does not allow the application of a password..
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question