One possible reason is that you might be passing a numerical field as a character field. Take a look at this for instance. If
intValue
is a numerical field, this will definitely throw an exception.
SELECT * FROM tblTable WHERE intValue = '1'
My advise would be for you to take a look at your queries first.