?
Solved

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

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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 set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

777 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