By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,061 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.

Problems with references

P: n/a
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

Nov 1 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Which version of the .Net framework are you running? I took your code and
copied it and pasted it into a new class in VS2005, and it worked fine. I'm
using .Net 2.0.

Also, what version of SQLServer are you using?

Robin

<la*****@yahoo.comwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...
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

Nov 1 '06 #2

P: n/a
Robin,

I'm using .Net 2.0 with SQL Server 2005.

RobinS wrote:
Which version of the .Net framework are you running? I took your code and
copied it and pasted it into a new class in VS2005, and it worked fine. I'm
using .Net 2.0.

Also, what version of SQLServer are you using?

Robin

<la*****@yahoo.comwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...
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
Nov 1 '06 #3

P: n/a
Weird. This is my System.Data dll location and file name. Do you have the
same thing? I think System.Data.SqlTypes is included in the System.Data.dll.
Mine is dated 9/23/2005 7:28 AM.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Syst em.Data.dll

Also, I assume you're using VS2005? yes?

If you bring up the Object Browser in VS2005 and look under System.Data, do
you see System.Data.SqlTypes there?

Robin

<la*****@yahoo.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
Robin,

I'm using .Net 2.0 with SQL Server 2005.

RobinS wrote:
>Which version of the .Net framework are you running? I took your code and
copied it and pasted it into a new class in VS2005, and it worked fine.
I'm
using .Net 2.0.

Also, what version of SQLServer are you using?

Robin

<la*****@yahoo.comwrote in message
news:11**********************@f16g2000cwb.googleg roups.com...
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

Nov 2 '06 #4

P: n/a
Yes, the file is there - System.Data.dll 2.0.50727.42 9/23/2005 6:28AM
I am using VS2005
And I can see System.Data.Sqltypes beneath System.Data in the Object
Browser!

RobinS wrote:
Weird. This is my System.Data dll location and file name. Do you have the
same thing? I think System.Data.SqlTypes is included in the System.Data.dll.
Mine is dated 9/23/2005 7:28 AM.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Syst em.Data.dll

Also, I assume you're using VS2005? yes?

If you bring up the Object Browser in VS2005 and look under System.Data, do
you see System.Data.SqlTypes there?

Robin

<la*****@yahoo.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
Robin,

I'm using .Net 2.0 with SQL Server 2005.

RobinS wrote:
Which version of the .Net framework are you running? I took your code and
copied it and pasted it into a new class in VS2005, and it worked fine.
I'm
using .Net 2.0.

Also, what version of SQLServer are you using?

Robin

<la*****@yahoo.comwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...
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
Nov 2 '06 #5

P: n/a
Yes, the file is there - System.Data.dll 2.0.50727.42 9/23/2005 6:28AM
I am using VS2005
And I can see System.Data.Sqltypes beneath System.Data in the Object
Browser!

RobinS wrote:
Weird. This is my System.Data dll location and file name. Do you have the
same thing? I think System.Data.SqlTypes is included in the System.Data.dll.
Mine is dated 9/23/2005 7:28 AM.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Syst em.Data.dll

Also, I assume you're using VS2005? yes?

If you bring up the Object Browser in VS2005 and look under System.Data, do
you see System.Data.SqlTypes there?

Robin

<la*****@yahoo.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
Robin,

I'm using .Net 2.0 with SQL Server 2005.

RobinS wrote:
Which version of the .Net framework are you running? I took your code and
copied it and pasted it into a new class in VS2005, and it worked fine.
I'm
using .Net 2.0.

Also, what version of SQLServer are you using?

Robin

<la*****@yahoo.comwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...
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
Nov 2 '06 #6

P: n/a
Does the error happen at runtime, or when you Build?

What does your connection string look like?

Robin

<la*****@yahoo.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
Yes, the file is there - System.Data.dll 2.0.50727.42 9/23/2005 6:28AM
I am using VS2005
And I can see System.Data.Sqltypes beneath System.Data in the Object
Browser!

RobinS wrote:
>Weird. This is my System.Data dll location and file name. Do you have the
same thing? I think System.Data.SqlTypes is included in the
System.Data.dll.
Mine is dated 9/23/2005 7:28 AM.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Sys tem.Data.dll

Also, I assume you're using VS2005? yes?

If you bring up the Object Browser in VS2005 and look under System.Data,
do
you see System.Data.SqlTypes there?

Robin

<la*****@yahoo.comwrote in message
news:11*********************@e3g2000cwe.googlegro ups.com...
Robin,

I'm using .Net 2.0 with SQL Server 2005.

RobinS wrote:
Which version of the .Net framework are you running? I took your code
and
copied it and pasted it into a new class in VS2005, and it worked
fine.
I'm
using .Net 2.0.

Also, what version of SQLServer are you using?

Robin

<la*****@yahoo.comwrote in message
news:11**********************@f16g2000cwb.googleg roups.com...
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


Nov 2 '06 #7

P: n/a
I got an e-mail from "larclap". He talked to MSFT;
his project file was corrupted. I presume that
fixed the problem.

Robin S.

"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:oK******************************@comcast.com. ..
Does the error happen at runtime, or when you Build?

What does your connection string look like?

Robin

<la*****@yahoo.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
>Yes, the file is there - System.Data.dll 2.0.50727.42 9/23/2005 6:28AM
I am using VS2005
And I can see System.Data.Sqltypes beneath System.Data in the Object
Browser!

RobinS wrote:
>>Weird. This is my System.Data dll location and file name. Do you have
the
same thing? I think System.Data.SqlTypes is included in the
System.Data.dll.
Mine is dated 9/23/2005 7:28 AM.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Sy stem.Data.dll

Also, I assume you're using VS2005? yes?

If you bring up the Object Browser in VS2005 and look under System.Data,
do
you see System.Data.SqlTypes there?

Robin

<la*****@yahoo.comwrote in message
news:11*********************@e3g2000cwe.googlegr oups.com...
Robin,

I'm using .Net 2.0 with SQL Server 2005.

RobinS wrote:
Which version of the .Net framework are you running? I took your code
and
copied it and pasted it into a new class in VS2005, and it worked
fine.
I'm
using .Net 2.0.

Also, what version of SQLServer are you using?

Robin

<la*****@yahoo.comwrote in message
news:11**********************@f16g2000cwb.google groups.com...
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



Nov 7 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.