Solved

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

Posted on 2004-10-07
2
1,687 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to take different types of Oracle backups using RMAN.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now