I've created a small n-tiered application similar to the one created in this
demo video:

http://windowsclient.net/learn/video.aspx?v=14625&CommentPosted=true#commentmessage

The application has all of it's data access code in a seperate class library
that uses strong typed datasets and table adapters. This class library also
contains an app.config file that stores the connection string to the
database. When the project is deployed it is a .dll file (like all class
library projects). How can I change the connection string without
re-compiling the project?

Re: accessing connection string in data access layer by Peter

Peter
Sun Jun 22 12:12:13 CDT 2008

Change myapplication.exe.config and the app doesn't need to be recompiled,
but you do need to read the string using the ConfigurationManager class.


--
Pete
=========================================
I use Enterprise Core Objects (Domain driven design)
http://www.capableobjects.com/
=========================================



RE: accessing connection string in data access layer by MortenWennevik

MortenWennevik
Mon Jun 23 01:58:00 CDT 2008

Hi Tirrell,

The executing application needs to have a application config/web.config file
which copies the app settings from the dll. This needs to be copied exactly
or the dll will revert to the default setting. In case of user or application
settings remember to copy the sectiongroup as well.

--
Happy Coding!
Morten Wennevik [C# MVP]


"Tirrell Cotton" wrote:

> I've created a small n-tiered application similar to the one created in this
> demo video:
>
> http://windowsclient.net/learn/video.aspx?v=14625&CommentPosted=true#commentmessage
>
> The application has all of it's data access code in a seperate class library
> that uses strong typed datasets and table adapters. This class library also
> contains an app.config file that stores the connection string to the
> database. When the project is deployed it is a .dll file (like all class
> library projects). How can I change the connection string without
> re-compiling the project?
>