Guest Posted February 10, 2011 Share Posted February 10, 2011 Message from: "Javi" Hi Farshad I am testing the new component TUniDBCheckBox This does not work. This does not alter the visual check DBHabilitado.Checked: = True; I have found another way to solve the problem. DBHabilitado.Field.AsString: = 'True'; Thanks Javi -- NNTP.hk - (^(oo)^) http://www.nntp.hk/web/ . Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2011 Author Share Posted February 11, 2011 Message from: "Farshad Mohajeri" "Javi" wrote in message news:humfMiPyLHA.2720@anaxagvs227... > Hi Farshad > > I am testing the new component TUniDBCheckBox > > This does not work. This does not alter the visual check > DBHabilitado.Checked: = True; > It works here, can you check again? > I have found another way to solve the problem. > DBHabilitado.Field.AsString: = 'True'; > > Thanks > Javi > -- > NNTP.hk - (^(oo)^) > http://www.nntp.hk/web/ > . Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2011 Author Share Posted February 11, 2011 Message from: "Javi" > > > "Javi" wrote in message > news:humfMiPyLHA.2720@anaxagvs227... > > Hi Farshad > > > > I am testing the new component TUniDBCheckBox > > > > This does not work. This does not alter the visual check > > DBHabilitado.Checked: = True; > > > > It works here, can you check again? No DBHabilitado.Checked: = true; or DBHabilitado.Checked: = False; DBHabilitado.Checked is always false. Also, visually, the state of the component DBHabilitado is cbGrayed (see attached) > > > I have found another way to solve the problem. > > DBHabilitado.Field.AsString: = 'True'; > > > > Thanks > > Javi > > -- > > NNTP.hk - (^(oo)^) > > http://www.nntp.hk/web/ > > > > > Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2011 Author Share Posted February 11, 2011 Message from: "Farshad Mohajeri" "Javi" wrote in message news:SneEZVeyLHA.2164@anaxagvs227... > >> >> >> "Javi" wrote in message >> news:humfMiPyLHA.2720@anaxagvs227... >> > Hi Farshad >> > >> > I am testing the new component TUniDBCheckBox >> > >> > This does not work. This does not alter the visual check >> > DBHabilitado.Checked: = True; >> > >> >> It works here, can you check again? > > No > > DBHabilitado.Checked: = true; > or > DBHabilitado.Checked: = False; > > DBHabilitado.Checked is always false. > > Also, visually, the state of the component DBHabilitado is cbGrayed (see > attached) > Do you attach it to a Field of type of Boolean or? . Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2011 Author Share Posted February 14, 2011 Message from: "Javi" -- NNTP.hk - (^(oo)^) http://www.nntp.hk/web/ "Farshad Mohajeri" wrote: > > > "Javi" wrote in message > news:SneEZVeyLHA.2164@anaxagvs227... > > > >> > >> > >> "Javi" wrote in message > >> news:humfMiPyLHA.2720@anaxagvs227... > >> > Hi Farshad > >> > > >> > I am testing the new component TUniDBCheckBox > >> > > >> > This does not work. This does not alter the visual check > >> > DBHabilitado.Checked: = True; > >> > > >> > >> It works here, can you check again? > > > > No > > > > DBHabilitado.Checked: = true; > > or > > DBHabilitado.Checked: = False; > > > > DBHabilitado.Checked is always false. > > > > Also, visually, the state of the component DBHabilitado is cbGrayed (see > > attached) > > > > Do you attach it to a Field of type of Boolean or? > > > It is Char(5) . Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2011 Author Share Posted February 14, 2011 Message from: "Sergio" Javi wrote: Boolean values are true or false, but not 'true' or 'false', they are not strings, they are just a one bit value. In some databases, like FireBird, booleans are integers that can have a value of 1 (true) or 0 (false), but not an string. In this case, you have to set a TDBCheckBox.ValueChecked:= 1; and may be you can use it to set the ValueChecked:= 'true' so it will work as you spect... but it is a waste of resources to use a char(5) instead of a smallint, word, integer, etc. . Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2011 Author Share Posted February 14, 2011 Message from: "Farshad Mohajeri" "Sergio" wrote in message news:m7hrKWDzLHA.2160@anaxagvs227... > Javi wrote: > > > Boolean values are true or false, but not 'true' or 'false', they are > not strings, they are just a one bit value. > > In some databases, like FireBird, booleans are integers that can have a > value of 1 (true) or 0 (false), but not an string. > > In this case, you have to set a TDBCheckBox.ValueChecked:= 1; and may > be you can use it to set the ValueChecked:= 'true' so it will work as > you spect... but it is a waste of resources to use a char(5) instead of > a smallint, word, integer, etc. I did some modifications to UniDBCheckBox and now it supports String values and "ValueChecked" properties. It will be available in next build. Again as you said it is better to use binary boolean fields wherever possible. . Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2011 Author Share Posted February 14, 2011 Message from: "Farshad Mohajeri" "Javi" wrote in message news:yhEsKMBzLHA.2160@anaxagvs227... > > > -- > NNTP.hk - (^(oo)^) > http://www.nntp.hk/web/ > > "Farshad Mohajeri" wrote: >> >> >> "Javi" wrote in message >> news:SneEZVeyLHA.2164@anaxagvs227... >> > >> >> >> >> >> >> "Javi" wrote in message >> >> news:humfMiPyLHA.2720@anaxagvs227... >> >> > Hi Farshad >> >> > >> >> > I am testing the new component TUniDBCheckBox >> >> > >> >> > This does not work. This does not alter the visual check >> >> > DBHabilitado.Checked: = True; >> >> > >> >> >> >> It works here, can you check again? >> > >> > No >> > >> > DBHabilitado.Checked: = true; >> > or >> > DBHabilitado.Checked: = False; >> > >> > DBHabilitado.Checked is always false. >> > >> > Also, visually, the state of the component DBHabilitado is cbGrayed >> > (see >> > attached) >> > >> >> Do you attach it to a Field of type of Boolean or? >> >> >> > > It is Char(5) > OK. Next build will support it. . Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now