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 » WebSphere Process Server (WID/WPS/WAS+) » ORACLE DB Timestamp insert

Post new topic  Reply to topic
 ORACLE DB Timestamp insert « View previous topic :: View next topic » 
Author Message
stallin
PostPosted: Wed May 06, 2009 2:41 am    Post subject: ORACLE DB Timestamp insert Reply with quote

Novice

Joined: 11 Jan 2009
Posts: 21

Hi,

For a transaction I need to insert CURRENT_TIMESTAMP, DATE, TIME into Oracle Table from WPS.

I have configured the EIS Adapter all the data types are taken as string in the BG generated. I tried to give in Oracle format of Timestamp "06-MAY-09 03.11.20.330000 PM +05:30" but it fails

com.ibm.websphere.sca.ServiceRuntimeException: ResourceException thrown in J2CMethodBindingImpl.invoke() javax.resource.ResourceException: java.text.ParseException: Unparseable date: "06-MAY-09 03.11.20.330000 PM +05:30"

I tried changing the business object to Time giving CURRENT_TIMESTAMP and different options.

Can you tell me the best way to do this?

Thanks,
Stallin Vinoth
Back to top
View user's profile Send private message
wilfster
PostPosted: Fri Aug 28, 2009 2:04 am    Post subject: Reply with quote

Newbie

Joined: 28 Aug 2009
Posts: 2

Hi,

I know this is a very late reply and you've probably got this sorted by now but hopefully it may help others who come across this.

I was having exactly the same problem but if you format the text as :

06-MAY-09 03.11.20.330000 +05:30:PM

then the insert will work fine.

Hope it helps.
Back to top
View user's profile Send private message
stallin
PostPosted: Fri Aug 28, 2009 2:43 am    Post subject: Reply with quote

Novice

Joined: 11 Jan 2009
Posts: 21

Thanks, Wilfster.

I did a select from ORACLE using test client with BG and saw date format was differently fetched. Then I formatted the date in the insert satement in the same way.

What I was advised was that's not a good solution to tightly couple with a format and because it would fail if Oracle Admin configures the Date in different format. It seems in Java we can do an insert without bothering about the date format which admin sets.

Due to timelines I struck the first one.

Thanks,
Stallin Vinoth
Back to top
View user's profile Send private message
wilfster
PostPosted: Fri Aug 28, 2009 2:56 am    Post subject: Reply with quote

Newbie

Joined: 28 Aug 2009
Posts: 2

I can imagine that such tight specifying could cause a problem.

I've been writing an Oracle engine in C++ so the format is defined by me in the testing process so it's not an issue for me. The problem I had was that my local machine was happy to accept 24 hour times but the test machine only likes 12 hour and an AM/PM specifier.

Anyway, glad to hear you got your issue sorted.

wilfster
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Process Server (WID/WPS/WAS+) » ORACLE DB Timestamp insert
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.