| Author |
update problem in oracle
|
visu Nekk
Ranch Hand
Joined: Sep 06, 2005
Posts: 122
|
|
Using the above code i am able to update the data only if i update the Interview_Date column.Otherwise i am getting an error of type java.sql.SQLException: ORA-01861: literal does not match format string i am unable to figure out the problem.could somebody help me out [edited to add code tags and line breaks] [ October 06, 2005: Message edited by: Jeanne Boyarsky ]
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
If you want to update a DATE datatype (I'm guessing thats what the Interview_Date field's data type is, correct me if I'm wrong) and you are doing it with a Statement, you need to make sure that the format of the String you use to represent the date matches the format defined in the database. Now you could do this, or you could use a TO_DATE PL/SQL function, but far better is to use a PreparedStatement and bind the date. Then the format does not matter.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Santosh Rathi
Greenhorn
Joined: May 12, 2005
Posts: 5
|
|
|
I would suggest, for such a big update, you should use PreparedStatement.
|
 |
 |
|
|
subject: update problem in oracle
|
|
|