You could always put the connection string in the config file, and read
it from there.
If you have the need to use different data providers (SqlClient, OleDb,
Oracle), then I would look into using the Data Access Block in the
Enterprise Application Blocks from Microsoft. It will allow you to abstract
providers better through the config file.
Hope this helps.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.