I have a checkbox in the DataWindow, It can be checked and unchecked. The default value in the db is 0. When it's checked, the db value is updated to 1 and on uncheck, the value is updated to 0 again.
However, I want to update the database only if it has value 0. If it is already 1, then I don't want the user to be able to change it back to 0. So please tell me how can I do that? Here is the code from my DataWindow for the checkbox column:
column=(type=decimal(0) update=yes updatewhereclause=yes name=ok dbname="table.ok" values="1/0" )