I am trying to update some code. I have a vb file that begins with this...
Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Data.SqlTypes
Imports System.Configuration
<script runat="server">
...and it is failing here...
Using oConn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("tps_write").ConnectionString())
The error it returns is...
"Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'SqlConnection' is not defined."
Am I missing some system class?
EDIT: I updated the code to this...
Using oConn As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("tps_write").ConnectionString())
...and it accepts it. Why do I need to explicitly write out System.Data.SqlClient every time I use an object from that class???