So basically this code was working fine before. I had some computer issues and had to move the development folder around and when I reopened it, I am getting a "Type 'SqlConnection' is not defined" error on all of my pages, even though I am importing System.Data.SqlClient.
Intellisense seems to see that its imported, but I get the error whenever I try to build. Anyone what I can do to get the builder to realize that I've made the correct import again?
Imports System.Data.SqlClient
Partial Class Default11
Inherits System.Web.UI.Page
Dim patid As String
Dim term As Integer
Dim a1 As Integer
Dim a2 As Integer
Dim a3 As Integer
Dim connectionInfo As String = System.Configuration.ConfigurationManager.AppSettings("ConnectionInfo")
Dim connection As SqlConnection = New SqlConnection(connectionInfo)
Dim cmd As SqlCommand
Dim cmdStr As String
Extra info: Changing
Dim connection As SqlConnection = New SqlConnection(connectionInfo)
To
Dim connection As New SqlConnection(connectionInfo)
seems to get rid of the error, but I'd prefer not to have to go and change this on all of my pages.