In my asp.net application i frequently have to get data from a SQL database.<BR><BR>Each time I am respecifying the connection string:<BR><BR>Dim myConnection As New SqlConnection("server=localhost;database=dbName;uid=Name;pwd=Pass word;")<BR><BR>Is there a way/place to set this globally so if any info changes I can change it in one spot?<BR><BR>Also, I think I remember reading somewhere that you could actually specifiy it in the web.config - is that right or am I crazy? And if so how do you do this?<BR><BR>Thanks,<BR><BR>Chrishttp://www.aspmessageboard.com/forum/showMessage.asp?F=36&M=482225&P=1Add to web.config<BR>web.config<BR><configuration><BR> <appSettings><BR> <add key="cnnString" value=http://aspmessageboard.com/archive/index.php/"Data Source=111.111.111.111;Initial Catalog=base10;Min Pool Size=10;Max Pool Size=255;user id=user;pwd=password;" /> <BR>...<BR>...<BR>...<BR>And on pages you want to use the string<BR><BR>Dim myConnectionString As String = ConfigurationSettings.AppSettings("cnnString"))<BR><BR><BR>TThanks a lot.