PDA

View Full Version : How to create DSN based on user inputs?



MiltonNet
06-25-2007, 12:39 PM
I want to create a custom dialog to take user inputs such as SQL server name, Database name, etc. Once this information is collected, installer should create ODBC DSN.
HOW to create DSN based on user inputs?

Thanks

Alex_W
09-26-2007, 01:23 PM
I too would like to create an ODBC DSN programicly based on user inputs, but haven't had much luck so far. Any suggestions would be appreciated.

klacounte
09-26-2007, 04:52 PM
You can setup it up in the registry. I've attached some screen shots from an IS12 project but there's no difference in IS2008. I'd suggest configuring the DSN on a machine then look at the registry settings indicated in the screen shots to get the actual values to setup in your project. If you're not using SQL Server in the DSN then you can use Process Monitor or RegMon to see what registry entries get created/modified when the DSN is setup.