title: Yii & DB2 - CLI0112E Error in assignment. SQLSTATE=22005
body: <p>I am trying to verify that submitting a form with a blank field throws a pre-defined error message saying 'field cannot be blank'. This works on a SQLite db, however on DB2 I get a db exception: [IBM][CLI Driver] CLI0112E Error in assignment. SQLSTATE=22005</p>
  
  <p>The SQL being executed was: SELECT * FROM client WHERE id=''</p>
  
  <p>client is a table that has 'id' as a pk, it is of type BIGINT, cannot be null and is auto-generated. On my page, the form has a field called 'client_id' which is where a user can specify a client to add.</p>
  
  <p>My thinking is that for some reason, trying to search for '' (an empty string) in a numeric field is causing the problem. I have tried changing the data type to INTEGER but that didn't work because of various constraints. I know the error code is for 'data type mismatch', but I can't see why.</p>