DZone Forums
Go Back   DZone Forums > Community > Databases & SQL > Oracle
Reload this Page Problem in getting SessionTimeZone thru java code
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Join Date: Jul 2009
Default Problem in getting SessionTimeZone thru java code - 08-31-2009, 02:21 AM

When i am running select SESSIONTIMEZONE FROM dual or oracle client then its working fine and giving me result as +05:30.

But when i am executing same query in java code then i am getting the result as +00:00 on same database.

pstmt = con.prepareStatement("SELECT SESSIONTIMEZONE FROM dual");
pstmt.execute();
rs = pstmt.getResultSet();
if (rs.next()) {
String timeZoneInfo = rs.getString(1);
}

now i get timeZoneInfo as +00:00 as it should be +5:30.

Kindly reply ASAP.
Thanks in advance.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem while invoking web service through code ashu47202 Java 4 10-09-2009 01:57 PM
problem using fast code eclipse plugin rocky123 Eclipse 2 06-17-2009 12:38 AM
Remote debugging problem in application startup code satisha123 Eclipse 0 12-24-2008 05:52 AM
Interpret C code in java Code sammyac Java 0 10-15-2008 09:17 AM
Problem debugging SWT/JFace code... jorgedieguez Eclipse 1 08-19-2008 05:37 PM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com