Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Data type mismatch

 
Fred Victa
Ranch Hand
Posts: 192
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the variable, MAX_ACV, which is of type double. In my program, it is equal to 1000000.00

I also have another variable, ACV, which is of type double.

In my program if the ACV is greater than the MAX_ACV, then there will be an error message that says that the ACV is too large.

My program reads an XML file and puts the data into a database. If the ACV in the XML file is a large number such as 999999.00, then I get an error message that says, "java.sql.SQLException: Data type mismatch. (javaValue (999999.00): Length is not valid)

Could anyone explain what that error means and how I can correct my program?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35977
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fred,
What is the data type you are using in the database?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!