My program has a SQL connection string hard coded in place:
Public SQLconn As SqlConnection = New SqlConnection("Data Source=Database444;Initial Catalog=SQL3;User ID=user;Password=user")
Now I realized that there is a connection string stored in the Web.config file called connectionString and I want to link to that instead of hardcoding it on my program.
So I tried this:
Dim SQLconn As String = "Provider=SQLOLEDB;" & connectionString.ConnectionString
Now I get the error The name connectionString is not declared.
I've also added in the imports settings, but still no luck
Imports System.Data
Imports System.Data.OleDb
Imports System.Data.Odbc
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Globalization
What else am I missing?