开发者

Looking for script to add data source node to ODBC

I'm making installation script and I'm using ODBC, how can I automatically add a node to ODBC Data Sources.

Building installer with Visual Stu开发者_如何学Cdio setup project, but I'm able to run any script for it.

Thank you.


1)

ODBC Data Sources are typically defined in registry entries - located at -

HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI...... (DSNs on 32bit Windows or 64bit Windows)

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI...... (DSNs on 64bit Windows for 32bit Drivers)

That part of the registry contains the "System" DSNs - HKEY_CURRENT_USER contains "User" DSNs.

Of course, all drivers are different so there may be additional stuff required elsewhere too...

2)

You could also consider using File DSNs and ship the fie with the installer.

3)

You could also consider a DSN'less connection - but this would depend on how the ODBC application is coded.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜