For one of my projects, i need to develop a product in .net which will be connecting to a company's database to run specific queries. The database is unknown at development time.

1. Which component is able to let the user dynamically select a database connection and return a connection string such that i can save it? Or is there a better way to do this in .net code easily?

2. Given that connection string, and a usergiven query for that database, for how can i run that query? Is there a generic datareader, executescalar, etc

any help much appreciated!!!!!

Lisa