Hi Greg, I am not sure I understand what is your environment. I suppose you have several projects in your solution, some that generate libraries and other that generate application. I think you should have a separate "app.config" file for each application and store the connection string there. Leaving aside the discussion whether this is a good idea or not, this is where I lost you. Do you want to have capabilities to connect to different db instances from the same app? Or do you want to change connection on-the-fly from one instance to another during runtime? Please shed some more light.
Cheers, Ed -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] Behalf Of Gregory Miley Sent: Thursday, March 23, 2006 10:42 AM To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: [ADVANCED-DOTNET] [C#]: Multiple SQL Servers, Multiple Projects We are developing several in-house applications, basically one master "shell" application with several libraries. We operate on multiple MS SQL Servers: Dev, QA, Training, and Production. Each project has a Settings entry for a connection to the development server. Our goal is to have a way to modify each of those entries at once to change the connection to one of the previously mentioned SQL Servers. Right now we are, somewhat successfully, reading in the settings XML file and changing the connection string. This works, but I would like to think there is a better way to do this. The solution is set up in the following way: * MainSolution - (Solution) * Application Manager - (Main Project) * Settings * Shared Library - (Library Project) * Settings * Module1 Library - (Library Project) * Settings Etc.. I can provide more information if needed. Thanks, Greg =================================== This list is hosted by DevelopMentor. http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com