yeah, possibly, and my apologies if it appears I hijacked the thread in 
anyway....even though it's marked OT.


-----Original Message-----
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 08, 2007 10:35 AM
To: Tomcat Users List
Subject: Re: [OT] JDBC problem: PreparedStatement.setTimestamp function
ignores milliseconds in TOMCAT + ddbb Oracle


Ah, I see. So the OP's data may be intact but he may be covering one eye 
and squinting when looking at the results...

Propes, Barry L wrote:
> no I think they will, you just have to alter the session's NLS date format, 
> correct? To see them, I mean?
>
> -----Original Message-----
> From: Jon Wingfield [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 08, 2007 10:13 AM
> To: Tomcat Users List
> Subject: Re: [OT] JDBC problem: PreparedStatement.setTimestamp function
> ignores milliseconds in TOMCAT + ddbb Oracle
>
>
> It's a long time since my last Oracle project ;)
> The OP was finding milliseconds weren't being stored. I was under the 
> impression this would be the case if the date datatype were being used 
> instead of a timestamp.
>
> Propes, Barry L wrote:
>   
>> if he's using Oracle, a date field should take any kind of timestamp 
>> variable. Oracle does have a Timestamp field/data type, but you don't have 
>> to make it as such to get this to work.
>>
>> Could have been that my JDK API differed slightly from your's.
>>
>>
>> -----Original Message-----
>> From: Jon Wingfield [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, August 08, 2007 4:49 AM
>> To: Tomcat Users List
>> Subject: Re: [OT] JDBC problem: PreparedStatement.setTimestamp function
>> ignores milliseconds in TOMCAT + ddbb Oracle
>>
>>
>> That looks ok. Timestamp is the correct thing to use.
>> You have two systems: one that works, one that doesn't. So, check for 
>> differences in the SQL sub-systems between the two:
>> Are the drivers of the same (uptodate) version?
>> Are the database schemas using the same column type? (ie the one that 
>> fails is silently truncating the data)
>>
>> In your original post you mentioned Oracle9i and Postgres. If one works 
>> and the other doesn't, again, check the column type is correct.
>>
>> Jose Gargallo wrote:
>>   
>>     
>>> This is the code:
>>>
>>> java.sql.Timestamp time = new Timestamp(System.currentTimeMillis());
>>> ...
>>> pstmt = this.conexion.prepareStatement(INSERT);
>>> ...
>>> pstmt.setTimestamp(1, time);
>>>
>>> should I use java.sql.Date instead of java.util.Data?
>>>
>>> thanks
>>> Christopher Schultz escribió:
>>>     
>>>       
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> Barry,
>>>>
>>>> Propes, Barry L wrote:
>>>>  
>>>>       
>>>>         
>>>>> and what date type are you using? sql.date or util.date?
>>>>>     
>>>>>         
>>>>>           
>>>> I'm pretty sure that's going to be the problem.
>>>>
>>>>
>>>>         



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to