[DUG] TDBCheckbox

Bob Pawley rjpawley at shaw.ca
Tue Nov 24 08:00:39 NZDT 2009


Hi

I have two tdbcheckboxes.

I want one checkbox to be disabled unless the other checkbox is checked.

The following does compile but DBCheckbox6 isn't enebled when the sql condition is true.


Could someone suggest what it is I am doing wrong??

Bob

begin
  
       DBCheckbox6.Enabled := False;

          begin
        
            PSQLQuery2.Close;
      PSQLQuery2.SQL.Clear;
      PSQLQuery2.SQL.Add ('select (p_id.processes.pump1)');
      PSQLQuery2.SQL.Add ('from p_id.processes');
      PSQLQuery2.SQL.Add ('where p_id.processes.fluid_id = :Fluidid');
      PSQLQuery2.ParamByName('Fluidid').AsString := DBEdit2.Text;
      PSQLQuery2.Prepare;
      PSQLQuery2.Open;
      PSQLQuery2.First ;
      Pump:= PSQLQuery2.FieldByName('pump1').AsBoolean ;

          If
             Pump = True
        then
         DBCheckbox6.Enabled := True;
          end;
end;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20091123/a056efd7/attachment-0001.html 


More information about the Delphi mailing list