• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 404
  • Last Modified:

programatically install an ODBC entry including password?

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
PMH4514
Asked:
PMH4514
  • 3
1 Solution
 
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
according to this thread, this cannot be done due to the fact that it is very insecure.
0
 
PMH4514Author Commented:
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
 
Dennis AriesCEO @ Arkro ITCommented:
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
 
PMH4514Author Commented:
Thank you I will look into this.
0
 
PMH4514Author Commented:
That is an interesting class, but unless I'm missing something, it still does not allow the application of a password..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now