Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is the problem with this code?

 
kstalin babu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, you really need to post the Exception details - a stack trace would be very helpful. Actually, I'm assuming that you did in fact get an exception because you don't really even say that.

I did notice a couple of things though.
1. You are setting AutoCommit to true, but then explicitly calling con.commit(). You shouldn't call commit() or rollback() if AutoCommit is true.

2. Your query is using a to_char function for the 4th column. Not familiar with that, but from what I gather it is converting a date into a formatted string. That looks like it would be a problem when you try to update each row using "updateDate(4, myDate)" because you are telling the ResultSet to update a date column, yet it is a string that it being returned. I think you need to get rid of the to_char function and just return it as a date.
 
kstalin babu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mr. Blake
thanks for that
the problem is solved.
stalin.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic