473,699 Members | 2,311 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with references

The following code snippet has reference errors:

Imports System
Imports System.Data
Imports System.Data.Sql Types
Imports System.Data.Sql Client

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 .ConnectionStri ng = cnString
End Sub

The first error says:
Namespace or type specified in the Imports 'System.Data.Sq lTypes'
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.Sql types 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= 969db8053d3322a c, Retargetable=Ye s'
containing the base class 'System.Compone ntModel.Compone nt'. 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
7 5585
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.goo glegroups.com.. .
The following code snippet has reference errors:

Imports System
Imports System.Data
Imports System.Data.Sql Types
Imports System.Data.Sql Client

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 .ConnectionStri ng = cnString
End Sub

The first error says:
Namespace or type specified in the Imports 'System.Data.Sq lTypes'
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.Sql types 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= 969db8053d3322a c, Retargetable=Ye s'
containing the base class 'System.Compone ntModel.Compone nt'. 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
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.goo glegroups.com.. .
The following code snippet has reference errors:

Imports System
Imports System.Data
Imports System.Data.Sql Types
Imports System.Data.Sql Client

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 .ConnectionStri ng = cnString
End Sub

The first error says:
Namespace or type specified in the Imports 'System.Data.Sq lTypes'
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.Sql types 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= 969db8053d3322a c, Retargetable=Ye s'
containing the base class 'System.Compone ntModel.Compone nt'. 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
Weird. This is my System.Data dll location and file name. Do you have the
same thing? I think System.Data.Sql Types is included in the System.Data.dll .
Mine is dated 9/23/2005 7:28 AM.
C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \System.Data.dl l

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.Sql Types there?

Robin

<la*****@yahoo. comwrote in message
news:11******** *************@e 3g2000cwe.googl egroups.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.go oglegroups.com. ..
The following code snippet has reference errors:

Imports System
Imports System.Data
Imports System.Data.Sql Types
Imports System.Data.Sql Client

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 .ConnectionStri ng = cnString
End Sub

The first error says:
Namespace or type specified in the Imports 'System.Data.Sq lTypes'
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.Sql types 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= 969db8053d3322a c, Retargetable=Ye s'
containing the base class 'System.Compone ntModel.Compone nt'. 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
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.Sql types 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.Sql Types is included in the System.Data.dll .
Mine is dated 9/23/2005 7:28 AM.
C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \System.Data.dl l

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.Sql Types there?

Robin

<la*****@yahoo. comwrote in message
news:11******** *************@e 3g2000cwe.googl egroups.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.goo glegroups.com.. .
The following code snippet has reference errors:

Imports System
Imports System.Data
Imports System.Data.Sql Types
Imports System.Data.Sql Client

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 .ConnectionStri ng = cnString
End Sub

The first error says:
Namespace or type specified in the Imports 'System.Data.Sq lTypes'
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.Sql types 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= 969db8053d3322a c, Retargetable=Ye s'
containing the base class 'System.Compone ntModel.Compone nt'. 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
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.Sql types 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.Sql Types is included in the System.Data.dll .
Mine is dated 9/23/2005 7:28 AM.
C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \System.Data.dl l

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.Sql Types there?

Robin

<la*****@yahoo. comwrote in message
news:11******** *************@e 3g2000cwe.googl egroups.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.goo glegroups.com.. .
The following code snippet has reference errors:

Imports System
Imports System.Data
Imports System.Data.Sql Types
Imports System.Data.Sql Client

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 .ConnectionStri ng = cnString
End Sub

The first error says:
Namespace or type specified in the Imports 'System.Data.Sq lTypes'
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.Sql types 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= 969db8053d3322a c, Retargetable=Ye s'
containing the base class 'System.Compone ntModel.Compone nt'. 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
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******** *************@h 48g2000cwc.goog legroups.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.Sql types 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.Sql Types is included in the
System.Data.dl l.
Mine is dated 9/23/2005 7:28 AM.
C:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\System.Data.d ll

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.Sql Types there?

Robin

<la*****@yahoo .comwrote in message
news:11******* **************@ e3g2000cwe.goog legroups.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.go oglegroups.com. ..
The following code snippet has reference errors:

Imports System
Imports System.Data
Imports System.Data.Sql Types
Imports System.Data.Sql Client

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 .ConnectionStri ng = cnString
End Sub

The first error says:
Namespace or type specified in the Imports 'System.Data.Sq lTypes'
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.Sql types 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= 969db8053d3322a c, Retargetable=Ye s'
containing the base class 'System.Compone ntModel.Compone nt'. 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
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******** *************@h 48g2000cwc.goog legroups.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.Sql types 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.Sql Types is included in the
System.Data.d ll.
Mine is dated 9/23/2005 7:28 AM.
C:\WINDOWS\Mi crosoft.NET\Fra mework\v2.0.507 27\System.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.Sql Types there?

Robin

<la*****@yaho o.comwrote in message
news:11****** *************** @e3g2000cwe.goo glegroups.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*****@yaho o.comwrote in message
news:11****** *************** *@f16g2000cwb.g ooglegroups.com ...
The following code snippet has reference errors:

Imports System
Imports System.Data
Imports System.Data.Sql Types
Imports System.Data.Sql Client

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 .ConnectionStri ng = cnString
End Sub

The first error says:
Namespace or type specified in the Imports 'System.Data.Sq lTypes'
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.Sq ltypes 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=neutra l, PublicKeyToken= 969db8053d3322a c, Retargetable=Ye s'
containing the base class 'System.Compone ntModel.Compone nt'. 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2074
by: peter | last post by:
Hello all, Recently I've started to refactor my code ...(I'm using python 2.3.4) I tried to add extra functionality to old functions non-intrusively. When I used a construct, which involves renaming functions etc... I came across some recursive problems. (a basic construct can be found under the section BASIC CODE) These problems do not occur when renaming objects. (see section EXTRA CODE)
4
2301
by: David | last post by:
Hi, I want to work with Access 2002. I will need to be able to distribute my application to users that may still have access 2000 on their computers. I know access 2002 has a function that enables you to convert a database to a format of an earlier version of Access. I wanted to check for any unforeseen problems so here is what I did: I used Access 2002 to convert my Access 2000 application to the 2002
6
2879
by: Ishbel Kargar | last post by:
I've bought a new laptop (running Windows XP home edition) to replace my old one (running Windows 98). I don't have cable connection between the two computers, so I've transferred most of the files between the two using RW disk. I'm membership secretary for a charity (1300 members), with another smaller group (25 members), both using Access from MS Office 2000 Premium edition. On the new computer the small Db works fine, address...
5
1425
by: Dan Smith | last post by:
When I try to create a new C# Web Reference in Visual Studio 2003, I get an error message "The proxy settings on this computer are not configured correctly for web discovery. ..." This web reference is to a service on my machine - http://localhost/... - so I don't know why any proxy configuration should be necessary. Doing the same thing in Visual Studio 2002 works fine (i.e., no error about "proxy settings"). However, when I update...
10
2405
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ComboBox.SelectedValue = db_value; If the db_value was not included in the ComboBox value list the ComboBox.SelectedIndex used to return -1, Now the very same code is
19
2976
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and provide an open TD with a DIV in it for the content of this formlet. (The DIV is for DHTML to hide and show the content) I've created a web page showing step by step the two problems I'm encountering. This problem is much easier to see than it...
18
2260
by: __PPS__ | last post by:
Hello, I'm a university student and I'm preparing for my final today. I'm reading course notes, I found completely strange piece of code. It makes me laugh, I think the teacher needs to prepare herself for this course. so I ask for your point of view. here's the piece of code: Memory management by client!! // Listing 9.4. Memory management by client rather than by server object
2
1953
by: raylopez99 | last post by:
I'm having problems compiling complex reference declarations in MSVC++.NET 2002 IDE. Here is an example: // --Foo.h-- #include "Bar.h" class Bar; //forward decl. to a class Bar in another file, not used
2
3572
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in uby/Rails. I started it in Perl and gave up on Perl as I went from the 'display the database information on the web page' to the 're-display the information from the database and allow the user to update the database using the web page' stage and realized...
5
1600
by: Simon | last post by:
I have problem with namespaces. I have a program that consumes the web service and has for instance names space nsProgram. In this program I have defined several classes that I use for storing and handling internal information. Than I have web service, that also uses the same classes (I included the file as linked external resource). I included this web service as web reference and used name wsWeb. When I am trying to call the web...
0
8630
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9055
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8944
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8899
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4638
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3075
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.