cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christoph Gaffga" <cgaf...@triplemind.com>
Subject Re: Insert full date and time into Oracle databse using esql:parameter
Date Mon, 15 Jul 2002 08:47:24 GMT
Why you don't try this:

<esql:query>insert into query_stack
(t_stamp,username,q_body,q_type) values (
            NOW(),
            <esql:parameter><xsp:expr>uname</xsp:expr></esql:parameter>,
            <esql:parameter><xsp:expr>param</xsp:expr></esql:parameter>,

<esql:parameter><xsp:expr>Integer.parseInt(sql_type)</xsp:expr></esql:parame
ter>
                  )
          </esql:query>


yours
Christoph Gaffga
cgaffga@triplemind.com



From: "yuryx" <yuryx@mobicomk.donpac.ru>
> Is there any way to insert full datetime value into oracle database
> using the following syntax:
> <xsp:logic>
>  java.util.Date today=new java.util.Date();
> </xsp:logic>
> ...
>          <esql:query>insert into query_stack
> (t_stamp,username,q_body,q_type) values (
>             <esql:parameter type="Date"
>  ><xsp:expr>java.sql.Date(today.getTime())</xsp:expr></esql:parameter>,
>             <esql:parameter><xsp:expr>uname</xsp:expr></esql:parameter>,
>             <esql:parameter><xsp:expr>param</xsp:expr></esql:parameter>,
>
>
<esql:parameter><xsp:expr>Integer.parseInt(sql_type)</xsp:expr></esql:parame
ter>
>                   )
>
>           </esql:query>
> I always get the result value with 'zero' time :( , and I need to be
> able to insert hh24:mi:ss values.



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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