whateveragain
Programmer
I found this code at MS's web site to make a SQL connection. I haven't established an on-line web site yet and have been working with What do I put in the System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(" ") command line in order to get this to work?
Thanks
Dim rootWebConfig As System.Configuration.Configuration
rootWebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("What do I put here?")
Dim connString As System.Configuration.ConnectionStringSettings
If (0 < rootWebConfig.ConnectionStrings.ConnectionStrings.Count) Then
connString = rootWebConfig.ConnectionStrings.ConnectionStrings("MyConnectionString3")
If Not (Nothing = connString.ConnectionString) Then
Console.WriteLine("My connection string = {0}", connString.ConnectionString)
Else
Console.WriteLine("No My connection string")
End If
End If
Thanks
Dim rootWebConfig As System.Configuration.Configuration
rootWebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("What do I put here?")
Dim connString As System.Configuration.ConnectionStringSettings
If (0 < rootWebConfig.ConnectionStrings.ConnectionStrings.Count) Then
connString = rootWebConfig.ConnectionStrings.ConnectionStrings("MyConnectionString3")
If Not (Nothing = connString.ConnectionString) Then
Console.WriteLine("My connection string = {0}", connString.ConnectionString)
Else
Console.WriteLine("No My connection string")
End If
End If