• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sql Exception: inconsistent datatypes, need help

 
Tommi Vd
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i have a problem when i want to get some date out of my oracle database:

The table is empty but normally that may not be the cause, this is the error:



This is the code that queries the database:



In my database there is a from date and a to date, both are stored as dates in the database...
the now Date is java.util

Anyone who has an idea?

regards,

Kwast
 
Emanuel Kadziela
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
change "date = ?" to "date is null" and remove the extra parameter.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!