Solved

jdbc driver date format conversion - type 4 jdbc driver and oracle 9i

Posted on 2004-10-07
2
1,704 Views
Last Modified: 2008-02-01
Hi,

I work with oracle 9.0.1 server and jdbc driver from Oracle(classes12.zip/jar). From the scripting environment, if I try to insert a date field from a string with to_date('2004/10/06 10:21:00','yyyy/mm/dd hh24:mi:ss'), looks like the type 4 jdbc driver does some additional conversion and the oracle database server receives somes distorted input.

Is there any way,  I can disable the jdbc driver conversion or to handle this situation better through default config like nls_date_format settings?

Thanks
0
Comment
Question by:inquisitive123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Assisted Solution

by:seazodiac
seazodiac earned 250 total points
ID: 12248380
Not likely. Can you show me exactly what you mean by  if I try to insert a date field from a string with to_date('2004/10/06 10:21:00','yyyy/mm/dd hh24:mi:ss'), looks like the type 4 jdbc driver does some additional conversion and the oracle database server receives somes distorted input. ?

maybe an example...
0
 
LVL 7

Accepted Solution

by:
grim_toaster earned 250 total points
ID: 12256553
--> oracle database server receives somes distorted input
Hmm, shouldn't do.  Could you provide the full code that you are trying to run, and also indicate the driver you are using (OracleDriver or an xa variant?).  As an additional note, it would be preferable to do the type conversion in the java code (using a java.sql.Date or java.sql.Timestamp) and pass this onto Oracle (via a PreparedStatement).
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question