VBGood网站全文搜索 Google

首页 - 经验之谈 - 用FileDSN简化ODBC安装
发表评论(0)作者:Michael C. Amundsen, 平台:VB6.0+Win98, 阅读:11673, 日期:2000-10-30
Use FileDSNs to ease ODBC Installs
Submitted by Michael C. Amundsen, mike_tips@amundsen.com, http://www.amundsen.com
If you注释:re using an ODBC connection to your database, you can ease the process of installing the application on workstations by using the FileDSN (data source name) instead of the more-common UserDSN. You define your ODBC connection as you normally would with UserDSNs. However, the resulting definition is not stored in the workstation registry. Instead it gets stored in a text file with the name of the DSN followed by ".dsn" (i.e. "MyFileDSN.dsn"). The default folder for all FileDSNs is "c:\program files\common files\Odbc\data sources". Now, when you want to install the VB application that uses the FileDSN, all you need to do is add the FileDSN to the Install package and run the install as usual. No more setting up DSNs manually!

NOTE: FileDSNs are available with ODBC 3.0 and higher