Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: DBCheckBox - not displaying the proper values


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Mar 1, 2018 7:22 PM Last Post By: Alan Jeffery
Alan Jeffery

Posts: 56
Registered: 2/10/00
DBCheckBox - not displaying the proper values  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 28, 2018 7:03 PM
DXE7 - UniDac DB components on Win 7

I have a dbcheckbox that is linked to a field "confirmed" in a MySQL db. The value of the field is either a 0 or a 1. These are defined in the "ValueChecked" and "Valueunchecked" properties

For some strange reason or other ALL the DBCheckboxes are EITHER checked or unchecked based on the value of the confirmed field of the table row that is selected. So, if the value is "0" ALL check boxes are unchecked. If I switch to a row where confirmed is "1" then all check boxes are checked.

This is obviously wrong. Does anyone have any ideas what could be going wrong here? It used to work fine when using ADS local tables. So my suspicion is it has something to do with the way MySQL is returning values.

This may help (but then, maybe not) - the dbcheckbox is on a DBCtrlGrid.

Thanks

Alan

Edited by: Alan Jeffery on Mar 1, 2018 2:45 PM
Alan Jeffery

Posts: 56
Registered: 2/10/00
Re: DBCheckBox - not displaying the proper values  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 1, 2018 7:22 PM   in response to: Alan Jeffery in response to: Alan Jeffery
Alan Jeffery wrote:
DXE7 - UniDac DB components on Win 7

I have a dbcheckbox that is linked to a field "confirmed" in a MySQL db. The value of the field is either a 0 or a 1. These are defined in the "ValueChecked" and "Valueunchecked" properties

For some strange reason or other ALL the DBCheckboxes are EITHER checked or unchecked based on the value of the confirmed field of the table row that is selected. So, if the value is "0" ALL check boxes are unchecked. If I switch to a row where confirmed is "1" then all check boxes are checked.

This is obviously wrong. Does anyone have any ideas what could be going wrong here? It used to work fine when using ADS local tables. So my suspicion is it has something to do with the way MySQL is returning values.

This may help (but then, maybe not) - the dbcheckbox is on a DBCtrlGrid.

Thanks

Alan

Edited by: Alan Jeffery on Mar 1, 2018 2:45 PM

It appears the DBCntrlGrid, and query result aren't "behaving" as expected when it comes to setting the values for the DBCheckBox. So I've thrown it away and am now using another method of indicating the row's status. Which is working fine. Namely, if 'Confirmed' is 1 then the transaction number font style changes to fsBold,fsUnderline. Which, for some strange reason works fine. Sorry humour.

It seems DBCheckBox is "busted" under certain situations.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02