Re: vb.net "Name is not declared" question

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: ST (ST_at_discussions.microsoft.com)
Date: 12/11/04

  • Next message: Jeff_Relf: "Bailo is a pagliaccio."
    Date: Sat, 11 Dec 2004 13:25:06 -0800
    
    

    I actually figured out that issue by including this file (LuceneUtils.vb)
    into the project. It has this code:
    Imports System.Xml
    Imports Lucene.Net.Documents
    Imports Lucene.Net.Analysis
    Imports Lucene.Net.Index

    Imports Lucene.Net.Search
    Imports Lucene.Net.QueryParsers
    Imports Lucene.Net.Util
    Imports System
    Imports System.IO

    Module LuceneUtils
        Public Function getParser(ByRef a As Analyzer) As QueryParser
            If (a Is Nothing) Then
                a = New SimpleAnalyzer
            End If
            Dim qp As QueryParser = New QueryParser("body", a)
            qp.SetOperator(QueryParser.DEFAULT_OPERATOR_OR)
            Return qp
        End Function

        Public Function getQuery(ByVal query As String, ByRef a As Analyzer) As
    Query
            Return getParser(a).Parse(query)
        End Function
    End Module

    But NOW....when I try and debug, I'm getting this error:

    Parser Error
    Description: An error occurred during the parsing of a resource required to
    service this request. Please review the following specific parse error
    details and modify your source file appropriately.

    Parser Error Message: Could not load type 'biopsy._default'.

    Source Error:

    Line 1: <%@ Register TagPrefix="uc1" TagName="menu" Src="menu.ascx" %><%@
    Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb"
    Inherits="biopsy._default"%>
    Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    Line 3: <HTML>
     

    Source File: c:\inetpub\wwwroot\biopsy\default.aspx Line: 1

    Any ideas why this is happening? If you have time, can you explain to me
    what exactly that Luceneutil file is for, and why it's affecting the rest of
    my files now? Thanks!!

    "ST" wrote:

    > Do you have any suggestions for good books to help me with this? I have the
    > Microsoft Press Visual Basic.NET step by step...but I'm only working with web
    > applications, not windows, and it only has a little section in there on web
    > apps...and it's not very detailed.
    >
    > "Jon Skeet [C# MVP]" wrote:
    >
    > > ST <ST@discussions.microsoft.com> wrote:
    > > > What do you mean exactly? Sorry, this is code that somebody else did, and
    > > > they told me to just add it into an existing project we have.
    > >
    > > Then you need to ask them for the GetQuery method as well - and then
    > > start learning VB.NET from scratch, rather than from existing code. I
    > > know it's harsh, but learning from first principles is much more likely
    > > to get you a good firm foundation in the language (and the framework).
    > >
    > > --
    > > Jon Skeet - <skeet@pobox.com>
    > > http://www.pobox.com/~skeet
    > > If replying to the group, please do not mail me too
    > >


  • Next message: Jeff_Relf: "Bailo is a pagliaccio."

    Relevant Pages

    • Re: Extract information from a Java source (possible with syntax errors)
      ... Stefan Istrate a écrit: ... I want to extract information from a Java source file about the ... If you could trust thrid party tools, like eclipse compiler, you could get all you asked (AST, imports, etc.). ...
      (comp.lang.java.programmer)
    • Re: programmatic way for detecting imports....
      ... > 1) for each class in a jar see what are the imports for that class. ... "import" statements were in the corresponding source file (if there was ... convenience for programmers but has no representation in bytecode. ...
      (comp.lang.java.programmer)
    • Re: Indirect - Why does it seem to only work sometimes?
      ... The source file is renamed to standard one, ... or imports data from selected source file into workbook. ... in some of Excel NG's some time ago. ...
      (microsoft.public.excel.worksheet.functions)
    • Re: Imports question
      ... At the very top of your .vb source file ... Imports Microsoft.VisualBasic ... keyword at the top of your .cs source file: ... Prev by Date: ...
      (microsoft.public.dotnet.framework.aspnet)
    • ASP.net Error
      ... I do not have much VS or ASP.NET experience and am just starting learning, ... Any way - I created a new VB ASP.NET Web Project in VS and just ran the ... details and modify your source file appropriately. ... Parser Error Message: ...
      (microsoft.public.dotnet.framework.aspnet)