L
larclap
The following code snippet has reference errors:
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Public Class DataSourceDB
Private _Descr, _CsvFileName, _XSLTransform As SqlString
Private _dsID, _errorCode As SqlInt32
Private _mainConnection As SqlConnection
Private _rowsAffected As Int32
Public Sub New()
_mainConnection = New SqlConnection
_mainConnection.ConnectionString = cnString
End Sub
The first error says:
Namespace or type specified in the Imports 'System.Data.SqlTypes'
doesn't contain any public member or cannot be found. Make sure the
namespace or the type is defined and contains at least one public
member. Make sure the imported element name doesn't use any aliases.
However, when I try to add a reference to the project,
System.Data.Sqltypes is not a choice in the .NET tab.
The datatype SqlConnection has the following error:
Reference required to assembly 'System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes'
containing the base class 'System.ComponentModel.Component'. Add one to
your project.
But there already is a reference to System in the project!
What am I missing here?
TIA, Lars
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Public Class DataSourceDB
Private _Descr, _CsvFileName, _XSLTransform As SqlString
Private _dsID, _errorCode As SqlInt32
Private _mainConnection As SqlConnection
Private _rowsAffected As Int32
Public Sub New()
_mainConnection = New SqlConnection
_mainConnection.ConnectionString = cnString
End Sub
The first error says:
Namespace or type specified in the Imports 'System.Data.SqlTypes'
doesn't contain any public member or cannot be found. Make sure the
namespace or the type is defined and contains at least one public
member. Make sure the imported element name doesn't use any aliases.
However, when I try to add a reference to the project,
System.Data.Sqltypes is not a choice in the .NET tab.
The datatype SqlConnection has the following error:
Reference required to assembly 'System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes'
containing the base class 'System.ComponentModel.Component'. Add one to
your project.
But there already is a reference to System in the project!
What am I missing here?
TIA, Lars