473,657 Members | 2,481 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

BC30002 problem

I have a simple class written in vb.net:

'SongsDb.vb
Imports System.Configur ation
Imports System.Data
Imports Microsoft.Data. Odbc

Namespace AquehongaPortal
Public Class SongsDb
Public Function GetSongs() As DataSet
Dim sql As String

' build sql statement
sql = "SELECT SongId,Title,Bo dy,Type,PostedB y FROM Song WHERE ApprovedFlag = 1"

' create instance of Connection and DataAdapter object
Dim dbConn As New OdbcConnection( ConfigurationSe ttings.AppSetti ngs("ConnectStr ing"))
Dim dbDA As New OdbcDataAdapter (sql, dbConn)

' create and fill the DataSet
Dim dbDS As New DataSet()
dbDA.Fill(dbDS)

' give it back
Return dbDS
End Function
End Class
End Namespace

And a simple test web page:

<%@ Import Namespace="Syst em.Data" %>
<%@ Import Namespace="Aque hongaPortal" %>

<script runAt="Server">

Sub Page_Load(sende r As Object, e As EventArgs)
Dim songs As AquehongaPortal .SongsDb = New AquehongaPortal .SongsDb()
End Sub

</script>

<html>

<head>
<title>Test Page</title>
</head>

<body>
Test
</body>

</html>

The vb file was compiled and copied to the /bin folder of the default application.

As far as I know that is all I am supposed to do, yet I still get the error BC30002: Type 'AquehongaPorta l.SongsDb' is not defined.

Any thoughts?

Thanks.
Nov 18 '05 #1
2 1695
JD
Is the songsdb.vb getting compiled to the same assembly as the web page?

"Jason Callas" <Ja*******@hotm ail.com> wrote in message news:e7******** ******@TK2MSFTN GP11.phx.gbl...
I have a simple class written in vb.net:

'SongsDb.vb
Imports System.Configur ation
Imports System.Data
Imports Microsoft.Data. Odbc

Namespace AquehongaPortal
Public Class SongsDb
Public Function GetSongs() As DataSet
Dim sql As String

' build sql statement
sql = "SELECT SongId,Title,Bo dy,Type,PostedB y FROM Song WHERE ApprovedFlag = 1"

' create instance of Connection and DataAdapter object
Dim dbConn As New OdbcConnection( ConfigurationSe ttings.AppSetti ngs("ConnectStr ing"))
Dim dbDA As New OdbcDataAdapter (sql, dbConn)

' create and fill the DataSet
Dim dbDS As New DataSet()
dbDA.Fill(dbDS)

' give it back
Return dbDS
End Function
End Class
End Namespace

And a simple test web page:

<%@ Import Namespace="Syst em.Data" %>
<%@ Import Namespace="Aque hongaPortal" %>

<script runAt="Server">

Sub Page_Load(sende r As Object, e As EventArgs)
Dim songs As AquehongaPortal .SongsDb = New AquehongaPortal .SongsDb()
End Sub

</script>

<html>

<head>
<title>Test Page</title>
</head>

<body>
Test
</body>

</html>

The vb file was compiled and copied to the /bin folder of the default application.

As far as I know that is all I am supposed to do, yet I still get the error BC30002: Type 'AquehongaPorta l.SongsDb' is not defined.

Any thoughts?

Thanks.
Nov 18 '05 #2
Thanks for applying but I figured it out.

Because I created the vb file in VS.NET it decided to add its own namespace (named SongsDb) to the project.

Soooo.... With my own namespace statement the full namespace became SongsDb.Aquehon gaPortal.SongsD b.

All cleaned up and working.

(To answer your question JD --- no. The vb file was compiled completely separately. Would not even be sure HOW to get a web
page to be included as part of an assembly)

- Jason
"JD" <No@Where.com > wrote in message news:uR******** ******@tk2msftn gp13.phx.gbl...
Is the songsdb.vb getting compiled to the same assembly as the web page?

Nov 18 '05 #3

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

Similar topics

1
6514
by: B R | last post by:
Hi, I am trying to use System.DirectoryServices for quering Active Directory, I am getting the following error Compiler Error Message: BC30002: Type 'DirectoryEntry' is not defined. Why I am getting this error ? Any Help will be appriciated.
0
1588
by: Jim Hansen | last post by:
I re-installed Framework and now I am getting this error ClassBrowser. Most other page work just fine. Additionally, the debugger will not start from Visual Studio 2003.. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30002: Type 'SortTable' is...
2
4832
by: Ted | last post by:
I am new to ASP.NET and have been following te Quick Start tutorials (http://www.asp.net/tutorials/quickstart.aspx and http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/Default.asp?url=/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/aaconwalkthroughdeployingapplicationcomponents.asp and ). My problem is that I tried using a VB.NET local assembly ("business object") and I keep...
1
2577
by: JoeP | last post by:
Hi All, I have class named xRep.vb located at the App_Code folder. The below works just fine under the Visual Studio environment, but when running this code from the web server I am getting this err: Compiler Error Message: BC30002: Type 'xRep' is not defined. I copied the class even to the same folder of the aspx and the vb page. Dim oInquiery As New xRep() oInquiery.cVarName = cVarName What kind code should be entered to fix...
0
8394
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8306
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,...
1
8503
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
8605
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...
0
7327
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6164
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
5632
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();...
1
2726
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
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.