Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strongly typed data set connection string question

Status
Not open for further replies.

DeveloperJr

Programmer
Mar 10, 2007
25
0
0
US
I created strongly typed dataset by dragging and dropping from my server explorer.
The problem is that the connection string that was added to the app stetting section uses the properties of my local database. I know I can edit the connectionString section to whatever I want and leave the name as is. The problem is I want to point to two different DB based on if I am running in test or production mode. So my question is; Is there any way to insert conditional statement in the App.Config file?
 
You can check this link for an alternate solution but it will require to change the designer code

You can also add 2 entries as connection strings examples and then change the designer code in InitConnection() based on computer name or whatever you find fit.

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top