I've written an API program (in c++) that will run in Windows... and I need to determine the instance name to be able to attach (using sqleatin) to an instance on unix (solaris) server, or even the same PC. As the program is destined for distribution, hard coded instances is not appropriate. I've used SQLDataSources to list the dsn's available but I need to relate the one selected by the user to their respective instance - any ideas?