cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alfredas Chmieliauskas <alfre...@sseriga.edu.lv>
Subject Re: C1: ESQL handling single apostrophes
Date Fri, 28 Sep 2001 22:59:50 GMT
the single quotes is not (should not be) the problem.
try putting the statement directly into <esql:query>...</> instead of 
the <xsp:expr>string - see if it works. just quessing but the problem 
might be there...

Alfredas

Mark S. Kent wrote:

>Oops.  I realized that I put the "<" in the SQL string. That's not what I
>meant... MY string really does have an "=" in it, not a "<" (although that
>is good to know that I need to "escape" that when I do a "date less than" in
>my SQL string in the future...)
>
>I need my SQL string to read:
>	String dynSQL = "select foo from bar where some_date = 'today' ";
>
>But the single quotes are making it bomb.
>
>Mark
>
>-----Original Message-----
>From: Mark S. Kent [mailto:mark.kent@vistyx.com]
>Sent: Friday, September 28, 2001 4:14 PM
>To: cocoon-users@xml.apache.org
>Subject: C1: ESQL handling single apostrophes
>
>
>I have an XSP created string that I am passing to ESQL to create a dynamic
>SQL string.  It worked fine until I added: "and some_date = 'today'" to the
>WHERE clause (InterBase 6.0 format for the 'today' value).
>
>I've tried this:
><page>
>    <xsp:logic>
>        String dynSQL = "select foo from bar where some_date = 'today' ";
>    </xsp:logic>
>
>    <esql:connection>
>        <esql:pool>default</esql:pool>
>        <esql:execute-query>
>            <esql:query><xsp:expr>dynSQL</xsp:expr></esql:query>
>            <esql:results>
>                <esql:row-results>
>                    <foodata><esql:get-string column="foo"/></foodata>
>                </esql:row-results>
>            </esql:results>
>            </esql:query>
>        </esql:execute-query>
>    </esql:connection>
></page>
>
>Other previous postings that others have used had something like this:
>        String dynSQL = "select foo from bar where some_date = '" +
>todayString + "' ";
>
>but that's not working for me either...
>
>Mark
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message