hi sorry its me again!
so iv been racking my brain as to why i am having issues and im presuming its something simple!
Basically i have a simple form with 1 textbox, and 1 checkbox.
i then have a ClientName Table in my database with ClientName and Meeting Client name is ShortText and Meeting is Yes/No.
i then try to feed this back to my Database using code similar below
"UPDATE ClientTable SET ClientName='"+clientName+"'and Meeting="+meeting+"";
Now when i input the data into my Form and click the save button i get an acception saying:
SQL STATEMENT IS : UPDATE ClientTable SET ClientName='Test'and Meeting=true
Errornet.ucanaccess.jdbc.UcanaccessSQLException: data type of expression is not boolean
Now im sure it is something really simple and stupid but im litterally just starting out with Java and SQL so im a little rusty i have tried searching for subject matter and to find any examples on processing Booleans but am so far coming up with very little!
any help in this matter would be very much appreciated!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
your sql is wrong. Try the following:
UPDATE ClientTable SET ClientName='Test', Meeting=true
Another useful information: notice that it's better to use the 2.0.7 which has a bug fix related to boolean type management.
Cheers Marco
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi sorry its me again!
so iv been racking my brain as to why i am having issues and im presuming its something simple!
Basically i have a simple form with 1 textbox, and 1 checkbox.
i then have a ClientName Table in my database with ClientName and Meeting Client name is ShortText and Meeting is Yes/No.
i then try to feed this back to my Database using code similar below
"UPDATE ClientTable SET ClientName='"+clientName+"'and Meeting="+meeting+"";
Now when i input the data into my Form and click the save button i get an acception saying:
SQL STATEMENT IS : UPDATE ClientTable SET ClientName='Test'and Meeting=true
Errornet.ucanaccess.jdbc.UcanaccessSQLException: data type of expression is not boolean
Now im sure it is something really simple and stupid but im litterally just starting out with Java and SQL so im a little rusty i have tried searching for subject matter and to find any examples on processing Booleans but am so far coming up with very little!
any help in this matter would be very much appreciated!
Hi,
your sql is wrong. Try the following:
UPDATE ClientTable SET ClientName='Test', Meeting=true
Another useful information: notice that it's better to use the 2.0.7 which has a bug fix related to boolean type management.
Cheers Marco