Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC 1

Status
Not open for further replies.

NiteCrawlr

Programmer
Mar 16, 2001
140
BR
Hi, :)

I'm having a little problem, I've created an ODBC connection with "MS ODBC Administrator" for Windows NT 4 SP6a, which an application will use it to insert some info into a table in Oracle (8.0.5). Is there any way while I create the ODBC conn to configure it so it doesn't ask for user_id and password everytime I try to use it?

Everytime my app try to insert some data, I have to put the user_id and password.

PS: My app is QARun.

Thank you.
 
This is possible, according to Metalink. The source of this info is note 77340.1 (Storing the password for an ODBC configuration). Please note that document 77340.1 strongly discourages you from storing passwords, but then proceeds to tell you how to do so.

The basic idea is to edit the registry to add an entry for the password. The registry entry will be recognised and used only if you are using a high enough version of the ODBC driver. On Oracle 8.0.5 that means at least ODBC 8.0.5.6.0.

If you are using a system DSN, add an entry named "password" to hkey_local_machine / software / odbc / odbc.ini. The value for this entry should be set to the desired password.

If you are using a user DSN, the entry for "password" should be made in hkey_current_user / software / odbc / odbc.ini.

If you are using a file DSN, things are a little different. You need to find out the location of your Data Sources folder, typically c:\Program Files\Common Files\ODBC\Data Sources. Open this file and add the line

PWD=your_password
 
Correction. The entry for "password" should be made in a subfolder of odbc.ini - the subfolder that corresponds to the DSN you want to automatically log in.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top