cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Cordes" <mcord...@maine.edu>
Subject Re: Probs with INSERT and esql
Date Sat, 24 Feb 2001 17:41:44 GMT
Hi,
I'm a little confused by your method, instead of:

> <esql:execute-query>
>     <esql:query>
>         <xsp:logic>
>             StringBuffer sql = new StringBuffer("insert into new_address
> values(");
>             sql.append(" '").append(request.getParameter("member_id"));
> ...
>             System.err.println(sql.toString());
>             <xsp:expr>sql.toString()</xsp:expr>
>         </xsp:logic>
>     </esql:query>

why not do:

<esql:query>
    insert into new_address values (
        <esql:parameter><request:get-parameter
name="member_id"/></esql:parameter> )
</esql:query>

Hope this helps.

-matt
----- Original Message -----
From: "Jon Brisbin" <brisbin@ipa.net>
To: <cocoon-users@xml.apache.org>; "Paul Russell" <prussell@apache.org>
Sent: Saturday, February 24, 2001 9:33 AM
Subject: RE: Probs with INSERT and esql


>
>
> >* Jon Brisbin (brisbin@ipa.net) wrote :
> >> java.lang.Exception: XSP Java Compiler: Compilation failed for
> >> _member_profile_insert.java
> >> 176: ')' expected.
> >>                     StringBuffer sql = new StringBuffer("insert into
> >> new_address values(");
> >>                                 ^
> >> 1 error
>
> >Looks like it could be a bug. Can you provide us with the fragment of
> >XML that caused it?
>
> <esql:execute-query>
>     <esql:query>
>         <xsp:logic>
>             StringBuffer sql = new StringBuffer("insert into new_address
> values(");
>             sql.append(" '").append(request.getParameter("member_id"));
> ...
>             System.err.println(sql.toString());
>             <xsp:expr>sql.toString()</xsp:expr>
>         </xsp:logic>
>     </esql:query>
>     ...
>
> Thanks!
>
> Jon Brisbin
> www.jbrisbin.net
>
>
> ---------------------------------------------------------------------
> 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