Creating ODBC connection with .Net Setup Project

One of my friends was wondering if there was a way to easily create an ODBC automatically with a .Net Setup project, so as to minimize manual configuration changes. Well, there is, ODBC connections are stored in a registry key

HKEY_LOCAL_MACHINE - SOFTWARE - ODBC - ODBC.INI

ODBC Data Sources - contains instance of each DSN, which corresponds to a DSN key in the folder.So to create a ODBC connection on the fly, all you need to do is add registry keys to the setup project. For example: Northwind is defined as DSN for Microsoft Sql Server

If you look at properties of Northwind, you'll find, driver, database, server etc... defined which corresponds to the connection. This configuration of registry can be used in the setup project to create DSN dynamically.

Print | posted on Monday, October 30, 2006 5:36 PM

Feedback

# re: Creating ODBC connection with .Net Setup Project

Left by software development company at 8/17/2009 11:10 AM
Gravatar Humm... interesting,
And the is no docing involve, Thats great

Thanks for bringing this up

Your comment:





 
Please add 7 and 4 and type the answer here:

Copyright © Bigyan Rajbhandari