ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » WBIMB/Oracle losing milliseconds

Post new topic  Reply to topic
 WBIMB/Oracle losing milliseconds « View previous topic :: View next topic » 
Author Message
thindk00
PostPosted: Tue Aug 09, 2005 11:47 am    Post subject: WBIMB/Oracle losing milliseconds Reply with quote

Voyager

Joined: 16 May 2001
Posts: 75
Location: UK

hi,

We're using WBIMB v5.0.3 with Oracle 9i and the supplied ODBC drivers. We have a message flow that is trying to insert timestamp (including milliseconds) into a Oracle table and finding that the insert works but we're losing the milliseconds. The Oracle colums is defined as having a TIMESTAMP(6) data type.

Is the data type definition causing the problem. If so, what should it be defined as? Otherwise is this a known bug? We're certain the ESQL is passing the correct values when making the INSERT call, we've checked this through a debugger.

Thanks,

Kulbir.
Back to top
View user's profile Send private message Send e-mail
Tibor
PostPosted: Wed Aug 10, 2005 1:48 am    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

We put a unix timestamp variable to an Oracle table in this way:
Code:
SET EpocTimeStamp = GMTTIMESTAMP '1970-01-01 00:00:00';
SET EventInterval = (CURRENT_GMTTIMESTAMP - EpocTimeStamp) SECOND * 1000;


and put EventInterval into a column TIMESTAMP, NUMBER(16).

Tibor
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Wed Aug 10, 2005 11:42 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

I have been doing some work with Oracle 9i lately and we used variables with TIMESTAMP(3).

Then in my Java code I do an INSERT as follows:
Code:
String sql = "INSERT INTO XXX_TBL (YYYY, Last_Access_TS, ZZZZZ) VALUES (?,current_timestamp,?)";
PreparedStatement pstmt = conn.prepareStatement(sql);
pstmt.setString(1, yyyyy);
pstmt.setString(3, zzzzz);
pstmt.executeUpdate();
pstmt.close();

This gives me precision to 3 digit milliseconds.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » WBIMB/Oracle losing milliseconds
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.