Solved

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

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

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many‚Ķ
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

757 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

16 Experts available now in Live!

Get 1:1 Help Now