|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WBIMB/Oracle losing milliseconds |
« View previous topic :: View next topic » |
Author |
Message
|
thindk00 |
Posted: Tue Aug 09, 2005 11:47 am Post subject: WBIMB/Oracle losing milliseconds |
|
|
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 |
|
 |
Tibor |
Posted: Wed Aug 10, 2005 1:48 am Post subject: |
|
|
 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 |
|
 |
RogerLacroix |
Posted: Wed Aug 10, 2005 11:42 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|