Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-10-07
2
Medium Priority
?
1,723 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 750 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 750 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to recover a database from a user managed backup
Suggested Courses

783 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