473,395 Members | 1,401 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,395 software developers and data experts.

Can't Find My Program

I am tyring to figure out why a class that I am trying to instatiate can not
be found. I am NOT WORKING WITH PRE_COMPILED code. I am dragging the source
code over and placing the code in a folder. I make the appropriate changes in
my @Page directive to ensure that the program would be compiled on the fly
("src="myProgram.aspx").

All works perfectly fine until I get to one of the pages with instatiates a
"utility" class that I created which is called from a number of the web pages.
I get the message "Compiler Error Message: BC30002: Type 'DataBaseAccess' is
not defined.".

My application is in an APPLICATION folder called "Temp". The utility class
"DataBaseAccess.vb" is in the "Temp" folder. This source is uncompiled
source. I have tried to place the <%@ Assembly Src="DatabaseAccess.vb" %> in
my page directives to see it this would help. No luck.

I have compiled this particular module and placed it in my bin folder and then
my error message changes to the following "Compiler Error Message: BC30182:
Type expected." and it highlights this line of code "Dim Table As New
DataBaseAccess()"

I want to figure out how to get the application to work and have the code
compiled on the fly. What do I need to try now?


Nov 17 '05 #1
2 1264
You need to compile that code before you reference it. ASP.NET will compile
the aspx files on the fly, but it does not compile class libraries or code
behind pages on the fly. Your assembly source will be a dll, and not raw
source.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows XP
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Jim Heavey" <Ji*******@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
I am tyring to figure out why a class that I am trying to instatiate can not be found. I am NOT WORKING WITH PRE_COMPILED code. I am dragging the source code over and placing the code in a folder. I make the appropriate changes in my @Page directive to ensure that the program would be compiled on the fly
("src="myProgram.aspx").

All works perfectly fine until I get to one of the pages with instatiates a "utility" class that I created which is called from a number of the web pages. I get the message "Compiler Error Message: BC30002: Type 'DataBaseAccess' is not defined.".

My application is in an APPLICATION folder called "Temp". The utility class "DataBaseAccess.vb" is in the "Temp" folder. This source is uncompiled
source. I have tried to place the <%@ Assembly Src="DatabaseAccess.vb" %> in my page directives to see it this would help. No luck.

I have compiled this particular module and placed it in my bin folder and then my error message changes to the following "Compiler Error Message: BC30182: Type expected." and it highlights this line of code "Dim Table As New
DataBaseAccess()"

I want to figure out how to get the application to work and have the code
compiled on the fly. What do I need to try now?

Nov 17 '05 #2
The statment that only "aspx" pages are compiled on the fly is not
accurate. It will compile "aspx.vb" pages if that page is identified in
the @Page directive with the "src" option.

Maybe you meant to say that if your aspx.vb page calls a straight .vb
page that it will not compile the program on the fly. Is that what you
meant?

I find it difficult to accept that some pages will compile on the fly
and others will not. What is the purpose of the "@Assembly" option - it
is suppose to allow you to link to other programs and that has on option
of specifying "src=" which would seem to suggest that it will compile
those programs on the fly if they are specified.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3

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

Similar topics

6
by: Peter Hansen | last post by:
Greetings. Im trying to write a program that can be run from the command line. If I want to search for example after a file with the ending .pdf, I should be able to write in the command line:...
5
by: Services of TKO | last post by:
Hi, On witch website i can find the whole script language of C++? I want to learn to program with C++ but i can't find a list of script language and what that script does (description). Can you...
3
by: Bob | last post by:
I need to create a program that is essentially a special fax sender using multi line Dialogic cards. I figure that the best way to do this so that it can be used from any app is to create someting...
0
by: georges the man | last post by:
The purpose: • Sorting and Searching • Numerical Analysis Design Specification You are to write a program called “StockAnalyser”. Your program will read a text file that contains historical...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
1
by: Shiva48 | last post by:
Thanks to Gannon11 and ro351988- Moderator. I give below the complete Java file and pls help me to rectify the errors. package com.wrox.proj2ee.ch10.app; import java.io.*; import...
65
by: Chris Carlen | last post by:
Hi: From what I've read of OOP, I don't get it. I have also found some articles profoundly critical of OOP. I tend to relate to these articles. However, those articles were no more objective...
1
by: jmDesktop | last post by:
I want to create my C# program to run in the background and detect when a program starts. In an interactive program, I know I can iterate through an array of Processes to find my process if I...
2
by: Olumide | last post by:
Hello, I've got this nice inner class that I'm holds a set of "FrontPoint" objects as shown below. Unfortunately, the find and insert methods trigger massive C2784 errors. Would someone please...
4
by: Salad | last post by:
I have a situation where some, not all, users get the message "Couldn't find file "F:\AccessApps\AppName.mdw". This file is required for startup". My app the users are attempting to access is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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,...
0
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...
0
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...
0
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...

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.