Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: How to share the connection string?

Reply
Thread Tools

Re: How to share the connection string?

 
 
sloan
Guest
Posts: n/a
 
      02-23-2010


PLEASE DO NOT MULTI-POST.

Answered in the csharp group.

http://www.lmgtfy.com/?q=Crosspost+v...roup+Etiquette




"Ele" <> wrote in message
news:4b83dad1$0$1129$. ..
> Hello,
>
> I have one solution containing two c# projects: one project builds a DLL
> that is used by the main project (the other project). In the web.config of
> the main project I added (in the appSettings section) the connectionString
> parameter, that I read to load my connection string (to SQL Server 2005).
>
> However, in the supporting project (the DLL), sometimes I need to connect
> to the database too. But I don't have the connection string there, and I
> don't want to duplicate it (in some constant inside the DLL). Sure, I can
> pass the connectionString each time I call a method/function in the DLL,
> but I think this is not a good way.
>
> So my question is: what is the best way to share the connectionString
> between the main project and the DLL?
>
> Thanks!
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
question DRb class definition share or not share Jack Ruby 2 10-11-2007 05:26 PM
Wireless Network - Setup - How? See/share Files, share printers, how? Wayne Wireless Networking 2 04-08-2006 04:34 PM
Re: Share/join 2 connection to 1 connection - Pls help d4n13l MCSE 6 04-21-2004 08:57 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57