-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: GreatScorpion75
Message 3 in Discussion
Hi,
You
can add the connections string in web.config file under <configuration>
tag to access it in your code.
Syntax:
<appSettings>
<add
key="PubsConnectionString" value="data
source=localhost;integrated
security=true;database=pubs;"/>
</appSettings>
You
can access this value in your class file by importing the System.Configuration
namespace and adding the following code in it.
AppSettingsReader ap = new
AppSettingsReader();
string sConnectionString = (string)
ap.GetValue("PubsConnectionString");
Hope
this helps..
Regards
Naveen
-----Original Message-----
From: pradeep145
[mailto:[EMAIL PROTECTED]
Sent: 07 August 2003
15:35
To: BDOTNET
Subject: Connection
string
New Message on BDOTNET
Connection string
Reply
Reply to Sender Recommend
Message 1 in
Discussion
From: pradeep145
Hi all
I have a DLL that has three classes.one of the class is
clsMakeconnection.that class have a connection string.
conStr
= "server=laptopmanisha; uid='sa'; pwd='';
database=E-Learning;";
this DLL is used in my web application
and i deployed my web appliaction.
but now i have to run this
setup on client machine that has different server name and uid
and password.
how can i change my connection string with the
new parameters.
i think problem is clear.
pls give me
valubale suggestion.
what can be the
solutions.
Regds
Pradeep
Chaudhary
View other groups in this
category.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]