I have a simple function that is supposed to import the
System.data.sql Client class but it keeps saying during the compiling that
the class cannot be found.
Error is: BC30466: Namespace or type 'data' for the Imports 'System.Data'
cannot be found.
It then underlines the System.data section of the Imports declaration. The
code for my .vb file is below.
' estoreDataLayer .vb
'
Imports System
Imports System.Data
Namespace estore
Public Class dataLayer
Public Sub New()
End Sub
Public Shared Function getDataReader( _
byVal sqlString As String) As sqlDataReader
dim myReader As sqlDataReader
dim myCommand As new sqlCommand()
with myCommand
.Connection = New sqlConnection(d ataLayer.connSt ring())
.connection.ope n()
.CommandText = sqlStatement
myReader = .ExecuteReader( CommandBehaviou r.CloseConnecti on)
End with
Return myReader
End Function
End Class
End Namespace
System.data.sql Client class but it keeps saying during the compiling that
the class cannot be found.
Error is: BC30466: Namespace or type 'data' for the Imports 'System.Data'
cannot be found.
It then underlines the System.data section of the Imports declaration. The
code for my .vb file is below.
' estoreDataLayer .vb
'
Imports System
Imports System.Data
Namespace estore
Public Class dataLayer
Public Sub New()
End Sub
Public Shared Function getDataReader( _
byVal sqlString As String) As sqlDataReader
dim myReader As sqlDataReader
dim myCommand As new sqlCommand()
with myCommand
.Connection = New sqlConnection(d ataLayer.connSt ring())
.connection.ope n()
.CommandText = sqlStatement
myReader = .ExecuteReader( CommandBehaviou r.CloseConnecti on)
End with
Return myReader
End Function
End Class
End Namespace
Comment