I put our connection strings in our machine.config file in
c:\(%windir%)\Microsoft.Net\Framework\(%Version%)\ Config
Like this:
<appSettings>
<add key="connMainDB1" value="data source=ipaddy;initial
catalog=db1;persist security info=False;user
id=blah;password=blah;workstation id=webserver;packet size=4096"/>
<add key="connMainDB2" value="data source=ipaddy;initial
catalog=db2;persist security info=False;user
id=blah;password=blah;workstation id=webserver;packet size=4096"/>
</appSettings>
then, in your app you can read that out by:
Dim strConn As String =
System.Configuration.ConfigurationSettings.AppSett ings("connMainDB1")
Of course, you can do the same thing in web.config.
Good Luck!
Bill
"steve" <an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
Hi,
I heard you could put your db connection string into the
web.config file to make it editable after you compile
and/or deploy.
I cant seem to find any info on this.. can any one help?
Sample code would be nice
Cheers
Steve