May be the query should look like this

         sql="SELECT Username FROM join11 WHERE eappname = ('" +EappName+ "'
and eappsurname =  '" +EappSurname+ "' and address=  '" +address+ "'and
towncity =  '" +TownCity+ "' and postcode =  '" +Postcode+ "'and phone =  '"
+Phone+ "'and email =  '" +email+ "' )";


Regards

Ramesh Kesavanarayanan
Off : 91-44-8113801 ext 2333
Tel:91-44-2265360
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>



        -----Original Message-----
        From:   ASALAM [SMTP:[EMAIL PROTECTED]]
        Sent:   Tuesday, March 19, 2002 8:46 AM
        To:     [EMAIL PROTECTED]
        Subject:        Re: SQL SELECT Problem

        Pls make your intention clear.
        The problem seems to be "Username" is not declared.
        Also I doubt whether  the query is well formed.

        Pls post the entire source code.

        ASalam.
        ----- Original Message -----
        From: "Graeme McLaren" <[EMAIL PROTECTED]>
        To: <[EMAIL PROTECTED]>
        Sent: Thursday, April 18, 2002 11:44 PM
        Subject: SQL SELECT Problem


        > Hi all, thank you for all the replies to my earlier SQL question,
I've now
        > managed to INSERT data to my database.  Now I have a problem
selecting the
        > data which I have inserted.
        >
        > I have a form which is to be filled out to retrieve a username
when a user
        > fills in their personal details.  I'm getting the following error:
        >
        >     97.                     out.println(""+Username+"");
        >                                               <------>
        > *** Error: No entity named "Username" was found in this
environment.
        >
        > In my JSP I have:
        >
        > String EappName=request.getParameter("EappName");
        > String EappSurname=request.getParameter("EappSurname");
        > String address=request.getParameter("address");
        > String TownCity=request.getParameter("TownCity");
        > String Postcode=request.getParameter("Postcode");
        > String Phone=request.getParameter("Phone");
        > String email=request.getParameter("email");
        >
        > sql="SELECT Username FROM join11 WHERE('" +EappName+ "', '"
+EappSurname+
        > "', '" +address+ "', '" +TownCity+ "', '" +Postcode+ "', '"
+Phone+ "', '"
        > +email+ "' )";
        >
        > out.println("<p>"+EappName+"</p>");
        > out.println("<p>"+EappSurname+"</p>");
        > out.println("<p>"+address+"</p>");
        > out.println("<p>"+TownCity+"</p>");
        > out.println("<p>"+Postcode+"</p>");
        > out.println("<p>"+Phone+"</p>");
        > out.println("<p>"+Username+"</p>");
        > out.println("<p>"+email+"</p>");
        >
        > What has gone wrong here?  Any advice is greatly appreciated.
        >
        > Thank you in advance,
        >
        > Graeme :)
        >
        > _________________________________________________________________
        > Join the world's largest e-mail service with MSN Hotmail.
        > http://www.hotmail.com
        >
        >

===========================================================================
        > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
        JSP-INTEREST".
        > For digest: mailto [EMAIL PROTECTED] with body: "set
JSP-INTEREST
        DIGEST".
        > Some relevant FAQs on JSP/Servlets can be found at:
        >
        >  http://archives.java.sun.com/jsp-interest.html
        >  http://java.sun.com/products/jsp/faq.html
        >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
        >  http://www.jguru.com/faq/index.jsp
        >  http://www.jspinsider.com
        >


===========================================================================
        To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
        For digest: mailto [EMAIL PROTECTED] with body: "set
JSP-INTEREST DIGEST".
        Some relevant FAQs on JSP/Servlets can be found at:

         http://archives.java.sun.com/jsp-interest.html
         http://java.sun.com/products/jsp/faq.html
         http://www.esperanto.org.nz/jsp/jspfaq.jsp
         http://www.jguru.com/faq/index.jsp
         http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to