PC Review


Reply
Thread Tools Rate Thread

BLL with Typed DataSet & Application Setting for Connection String

 
 
=?Utf-8?B?Z2VvZ3J1dmVu?=
Guest
Posts: n/a
 
      8th Oct 2007
I'm using a BLL that has a Typed DataSet which accesses an SQL Database via a
Connection String. The Connection String is set in the Application Settings
with Type = (Connection String)

When I add the BLL assembly to an ASP.NET Web Application, I want the BLL to
get the Connection String from Web.Config. This becomes an issue when going
from development, to staging to production.

Is there a strategy to set the Connection String in the BLL Assembly's
Application Settings so that the BLL DLL can be moved from development to
Staging to Production without a recompile just to change the Connection
String in the Application Settings?

TIA
g
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      9th Oct 2007
If the BLL has a reference to System.Web, and System.Configuration, then it
should be able to read the ConnectionStrings element just like a web page in
the web would do.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com



"geogruven" wrote:

> I'm using a BLL that has a Typed DataSet which accesses an SQL Database via a
> Connection String. The Connection String is set in the Application Settings
> with Type = (Connection String)
>
> When I add the BLL assembly to an ASP.NET Web Application, I want the BLL to
> get the Connection String from Web.Config. This becomes an issue when going
> from development, to staging to production.
>
> Is there a strategy to set the Connection String in the BLL Assembly's
> Application Settings so that the BLL DLL can be moved from development to
> Staging to Production without a recompile just to change the Connection
> String in the Application Settings?
>
> TIA
> g

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing connection string of a strong typed dataset Ammar S. Mitoori Microsoft ADO .NET 4 29th Aug 2009 09:31 AM
Re: Changing the "Connection String" for a "Strongly Typed DataSet" Dave Sexton Microsoft C# .NET 1 13th Dec 2006 02:08 PM
Re: Changing the "Connection String" for a "Strongly Typed DataSet" Sheng Jiang[MVP] Microsoft C# .NET 0 13th Dec 2006 01:30 PM
web.config connection string for typed dataset in different assemb =?Utf-8?B?VGVuRG90?= Microsoft ASP .NET 1 15th May 2006 08:13 PM
Set connection string at run time for typed DataSet (Framework 2.0 =?Utf-8?B?VGhvbWFzIFRheWxvcg==?= Microsoft ADO .NET 6 20th Jan 2006 04:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:06 AM.