cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <>
Subject Re: Retrieving a String from the database in XSP
Date Tue, 11 Feb 2003 13:47:43 GMT
In addition to the other chnages, try:
String style = ""; //add at the start of the XSP
  style = <esql:get-string column="STYLE"/>;
ie you do not need the "" - the <get-string> does just that!

>>> 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
<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."

View raw message