某dbcheckbox的checkedvalue值为true,uncheckedvalued为false,对应的字段为select。现在希望判断该checkbox是否被选中,使用了以下代码
if Adoquery1.fieldbyname('select').asstring = 'true' then ...
但无论dbcheckbox有无选上,都不会执行then后的语句,请问是什么原因?
if Adoquery1.fieldbyname('select').asstring = 'true' then ...
但无论dbcheckbox有无选上,都不会执行then后的语句,请问是什么原因?
宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
—————————————————————————————————
如果数据post:
if Adoquery1.fieldbyname('select').asboolean =true then ...
如果没有post
if DBCheckBox1.Checked then...