Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 94213 invoked by uid 500); 11 Feb 2003 13:48:12 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 93911 invoked from network); 11 Feb 2003 13:48:07 -0000 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.0.2 Date: Tue, 11 Feb 2003 15:47:43 +0200 From: "Derek Hohls" To: Subject: Re: Retrieving a String from the database in XSP Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_FFA0841E.65047FB0" X-MailScanner: Found to be clean X-MailScanner-SpamCheck: not spam, SpamAssassin (score=2, required 9, HTML_70_90, SPAM_PHRASE_03_05) X-MailScanner-SpamScore: ss X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --=_FFA0841E.65047FB0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit In addition to the other chnages, try: String style = ""; //add at the start of the XSP and style = ; ie you do not need the "" - the does just that! Derek >>> psyttrp@nottingham.ac.uk 11/02/2003 01:36:14 >>> I am trying to retrieve a string from the database an place it into a variable (should be simple I know)However I am getting a compilation error I am trying to insert the string value correctly? String myString = null; autorevs_pool select * from user_info where USERNAME='username' and PASSWORD='password' style = ""; style = ""; Cheers Tom -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. "The CSIR exercises no editorial control over E-mail messages and/or attachments thereto/links referred to therein originating in the organisation and the views in this message/attachments thereto are therefore not necessarily those of the CSIR and/or its employees. The sender of this e-mail is, moreover, in terms of the CSIR's Conditions of Service, subject to compliance with the CSIR's internal E-mail and Internet Policy." --=_FFA0841E.65047FB0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit
In addition to the other chnages, try:
 
String style = ""; //add at the start of the XSP
 
and
 
  style = <esql:get-string column="STYLE"/>;
 
ie you do not need the "" - the <get-string> does just that!
 
Derek

>>> psyttrp@nottingham.ac.uk 11/02/2003 01:36:14 >>>

I am trying to retrieve a string from the database an place it into a variable (should be simple I know)

However I am getting a compilation error

 

I am trying to insert the string value correctly?

 

String myString = null;

  

 <esql:connection><esql:pool>autorevs_pool</esql:pool>

      <esql:execute-query>

        <esql:query>select * from user_info where USERNAME='<xsp:expr>username</xsp:expr>' and PASSWORD='<xsp:expr>password</xsp:expr>'</esql:query>

        <esql:results>

              <xsp:logic>

                style = "<esql:get-string column="STYLE"/>";

              </xsp:logic>

        </esql:results>

        <esql:no-results>

          <xsp:logic>

            style = "”;

          </xsp:logic>

        </esql:no-results>

      </esql:execute-query>

    </esql:connection>

 

Cheers

 

Tom

 

 


--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

"The CSIR exercises no editorial control over E-mail messages and/or
attachments thereto/links referred to therein originating in the
organisation and the views in this message/attachments thereto are
therefore not necessarily those of the CSIR and/or its employees.
The sender of this e-mail is, moreover, in terms of the CSIR's Conditions
of Service, subject to compliance with the CSIR's internal E-mail and
Internet Policy." --=_FFA0841E.65047FB0--