Re: Insert full date and time into Oracle databse using esql:parameter-solved

2002-07-15 Thread yuryx

Thanx Vadim!

Vadim Gritsenko wrote:

>>From: yuryx [mailto:[EMAIL PROTECTED]]
>>
>>Hi all!
>>
>>Is there any way to insert full datetime value into oracle database
>>using the following syntax:
>>
>>
>> java.util.Date today=new java.util.Date();
>>
>>...
>> insert into query_stack
>>(t_stamp,username,q_body,q_type) values (
>>>
>>java.sql.Date(today.getTime()),
>>
>>
>
>Yury,
>
>Please read javadoc on java.sql.Date: it is *just* date, no time inside.
>
>You should be using java.sql.Timestamp.
>
>Vadim
>
>
>  
>
>uname,
>  
>
>param,
>  
>
>>
>>
>Integer.parseInt(sql_type)ramete
>  
>
>>r>
>>  )
>>
>>  
>>
>>I always get the result value with 'zero' time :( , and I need to be
>>able to insert hh24:mi:ss values.
>>
>>Thanx.
>>Yury.
>>
>>
>
>
>-
>Please check that your question  has not already been answered in the
>FAQ before posting. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>  
>




-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Insert full date and time into Oracle databse using esql:parameter

2002-07-15 Thread Vadim Gritsenko

> From: yuryx [mailto:[EMAIL PROTECTED]]
> 
> Hi all!
> 
> Is there any way to insert full datetime value into oracle database
> using the following syntax:
> 
> 
>  java.util.Date today=new java.util.Date();
> 
> ...
>  insert into query_stack
> (t_stamp,username,q_body,q_type) values (
> 
>java.sql.Date(today.getTime()),

Yury,

Please read javadoc on java.sql.Date: it is *just* date, no time inside.

You should be using java.sql.Timestamp.

Vadim


>
uname,
>
param,
> 
>
Integer.parseInt(sql_type) r>
>   )
> 
>   
> 
> I always get the result value with 'zero' time :( , and I need to be
> able to insert hh24:mi:ss values.
> 
> Thanx.
> Yury.


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Insert full date and time into Oracle databse using esql:parameter

2002-07-15 Thread yuryx

Christoph Gaffga wrote:

>Why you don't try this:
>
>insert into query_stack
>(t_stamp,username,q_body,q_type) values (
>NOW(),
>

This doesn't work (with sql exception )
It worked with 'sysdate' word instead of now() statement , but I have 
solve problem with use Data objects for any dates...
It worked with to_date('mytimestamp','DD-MM- 
hh24:mi:ss') statement also.

Thanx for the your reply.

Yury.

>uname,
>param,
>
>Integer.parseInt(sql_type)ter>
>  )
>  
>
>
>yours
>Christoph Gaffga
>[EMAIL PROTECTED]
>
>
>
>From: "yuryx" <[EMAIL PROTECTED]>
>  
>
>>Is there any way to insert full datetime value into oracle database
>>using the following syntax:
>>
>> java.util.Date today=new java.util.Date();
>>
>>...
>> insert into query_stack
>>(t_stamp,username,q_body,q_type) values (
>>> >java.sql.Date(today.getTime()),
>>uname,
>>param,
>>
>>
>>
>>
>Integer.parseInt(sql_type)ter>
>  
>
>>  )
>>
>>  
>>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. 
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>  
>




-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Insert full date and time into Oracle databse using esql:parameter

2002-07-15 Thread Christoph Gaffga

Why you don't try this:

insert into query_stack
(t_stamp,username,q_body,q_type) values (
NOW(),
uname,
param,

Integer.parseInt(sql_type)
  )
  


yours
Christoph Gaffga
[EMAIL PROTECTED]



From: "yuryx" <[EMAIL PROTECTED]>
> Is there any way to insert full datetime value into oracle database
> using the following syntax:
> 
>  java.util.Date today=new java.util.Date();
> 
> ...
>  insert into query_stack
> (t_stamp,username,q_body,q_type) values (
>   >java.sql.Date(today.getTime()),
> uname,
> param,
>
>
Integer.parseInt(sql_type)
>   )
>
>   
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Insert full date and time into Oracle databse using esql:parameter

2002-07-15 Thread yuryx

Hi all!

Is there any way to insert full datetime value into oracle database 
using the following syntax:


 java.util.Date today=new java.util.Date();

...
 insert into query_stack 
(t_stamp,username,q_body,q_type) values (
java.sql.Date(today.getTime()),
uname,
param,

Integer.parseInt(sql_type)
  )

  

I always get the result value with 'zero' time :( , and I need to be 
able to insert hh24:mi:ss values.

Thanx.
Yury.



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>