PDA

View Full Version : set ODBC Resources programmatically



sks2004
07-07-2005, 09:50 AM
How does one set ODBC Resources programmatically?
It is straightforward via the ODBC View...but not via code.

I need to alter the Server name, within a component that holds the ODBC Resources data (DSN), per user selection...

burked
07-08-2005, 06:12 AM
you can easily update ODBC entries by directly editing the registry
HKLM\SOFTWARE\ODBC\ODBC.INI.. then find the DSN name and update the "Server" data.

D

sks2004
07-08-2005, 11:06 PM
Thanks!

I can't believe I couldn't remember that...I've been doing that for a few years now, with my SilkTest regression testing scripts.

thanks again

LaTtEX
08-19-2005, 05:35 AM
When I tried adding a registry key under the HKLM>SOFTWARE>ODBC>ODBC.INI keys, I experienced an error to the effect of "not enough access to add this key" or something like that.

Anything else I need to do to be able to modify an ODBC registry key?