A
Abbey Gwayambadde
I have a simple function that is supposed to import the
System.data.sqlClient 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(dataLayer.connString())
.connection.open()
.CommandText = sqlStatement
myReader = .ExecuteReader(CommandBehaviour.CloseConnection)
End with
Return myReader
End Function
End Class
End Namespace
System.data.sqlClient 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(dataLayer.connString())
.connection.open()
.CommandText = sqlStatement
myReader = .ExecuteReader(CommandBehaviour.CloseConnection)
End with
Return myReader
End Function
End Class
End Namespace