Eric,

        Yes, sorry .Net 2.0. The centralized config might do the trick. 


 
Eddie,
        "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."

Changing it on-the-fly basically, yes. During run-time, we would like to
(if the current user belongs to certain groups: Programming, Tech,
etc... We can handle that logic elsewhere) be able to switch the data
server connection to one of several servers.

The application is basically one executable with several libraries for
the various modules we would have. Each library needs to have the same
connection as the application no matter what, but that connection needs
to be changeable during run-time.

I believe Eric may have answered it for me. Will let you all know what
we come up with. Any other suggestions in the mean-time will also be
appreciated.

Thanks,
Greg

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Means
Sent: Thursday, March 23, 2006 10:57
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [C#]: Multiple SQL Servers, Multiple Projects

You didn't say which version you're using, but in .Net 2.0 there's a way
to include settings from another .config file (which could be a single,
centralized config file), which would allow you to change a single
setting in a single file and have it be picked up by any number of apps.

Check out the section on external files here:
http://www.odetocode.com/Articles/418.aspx

On 3/23/06, Gregory Miley <[EMAIL PROTECTED]> wrote:
>
> 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(r)  http://www.develop.com
>
> View archives and manage your subscription(s) at 
> http://discuss.develop.com
>



--
Eric Means
[EMAIL PROTECTED]
http://www.randomtree.org/eric/

===================================
This list is hosted by DevelopMentor(r)  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

Reply via email to