Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "error" Watch "error" New topic
Author

error

rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
how to remove this error
SQLException caught: Incorrect decimal value: '' for column 'QUANTITY' at row 1
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1449
    
    6

You need to give some more detail about your code.


Swastik
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

well what is the value you are trying to insert into the quantity column? is it a valid number?

check the parameters you are getting. Put some system outs and use a debuggable prepared statement so you can actually see what you are trying to insert.

William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

You need to ensure that the Java attribute type matches the expected column definition.

In this case it seems that QUANTITY is expecting a decimal (numeric) value.
Maybe you are trying to insert a String?

Again, more information would help.

WP
 
jQuery in Action, 2nd edition
 
subject: error
 
Similar Threads
WA #1.....word association
Getting error in setupConnection()
problem in retreiving value
Regarding tomcat
print statement in the declaration ...