473,378 Members | 1,138 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

System.Data.sqlClient Class Compile Error

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
Nov 20 '05 #1
3 4307
Hello,

"Abbey Gwayambadde" <Ab***@centrixgroup.net> schrieb:
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.


Are you sure a reference to "System.Data.dll" is set?

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2
I am not sure how to check to see if system.data is referenced. In my
many infinit tries, I have also discovered the on complilation, the
system namespace compiles fine, so does the system.IO clas but
system.Net give the same "not found" error. HOWEVER, all my applications
that reference these codes inline(Asp.net) using a <%@ Import
namespace="system.data" %> work without an error. The problem seems to
lie in the vbc.exe compilor program loading the class.

I hope this helps with your trying to help me.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3
"Abbey Gwayambadde" <ab***@centrixgroup.net> schrieb:
I am not sure how to check to see if system.data is
referenced. In my many infinit tries, I have also discovered
the on complilation, the system namespace compiles fine,
so does the system.IO clas but system.Net give the same
"not found" error. HOWEVER, all my applications
that reference these codes inline(Asp.net) using a <%@ Import
namespace="system.data" %> work without an error.
The problem seems to lie in the vbc.exe compilor program
loading the class.


You may want to turn to the ng for ASP.NET questions:

news://msnews.microsoft.com/microsof...amework.aspnet

Web interface:

http://msdn.microsoft.com/newsgroups...amework.aspnet

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
0
by: MS | last post by:
I am very new to asp.net. Please help me in resolving the error: DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name RENEW_EXIST. I get the above error with the...
2
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET ...
1
by: Manuel Canas | last post by:
Hello there, I am using the VB.NET Standart Edition compiler and I would like to know if this is not supported on this edition. This is just a testing code from a book that I'm trying here and...
2
by: AnalogKid17 | last post by:
Keywords: ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a WinXP Box I've betting the following for days... it's driving me insane: Server Error in '/' Application. ...
1
by: Jeff | last post by:
ASP.NET 2.0 I have a webproject using n-tier design. The DAL for Sql Server 2005 is placed in a separate class library project named SqlServer2005. I assume the folder name(DAL_SqlServer2005) in...
1
by: thithi | last post by:
Please help me " System.Data.SqlClient.SqlException: Prepared statement '(@Name varchar(100),@Describes varchar(100),@Money char(10))Upda' expects parameter @Describes, which was not supplied. at...
1
by: Pedro Dinis | last post by:
i have this class library that connects to the database(see appconfig below) compiling 0 errors but when its running i amhaving this error An unhandled exception of type...
2
by: lily86 | last post by:
i'm very new so i hope all of u can help me. when i debug my webforms this error occur "An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll Additional...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.