In order to store login credentials in the registry entry for a Windows ODBC data source, manually edit the registry.
- Open regedit and locate the key containing your data source attributes
- Double click (the 'string value') UserID and enter the user id value you wish to hard code into the data source
- Double click (the 'string value') Password and enter the password value you wish to hard code into the data source
- Double click (the 'string value') DSN and enter the DSN value you wish to hard code into the data source
Find below options where the key for the ODBC connection will be saved.
- User ODBC data sources are stored in the registry hive: HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI
- System ODBC data sources are stored in the registry hive: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI (32-bit ODBC data sources on 32-bit machines, 64-bit ODBC data sources on 64-bit machines) or HKEY_LOCAL_MACHINE\Wow6432Node\SOFTWARE\ODBC\ODBC.INI (32-bit ODBC data sources on 64-bit machines)