0
I’m trying to implement my application, where the table empresa won a new column called status, which would be completed in accordance with Radio Button this would serve so that when generating the reports of linked clients, the same only bring me customers with Status = Assets, I’m a beginner in Delphi, so I’m not succeeding, according to Radio Button fill this column. I have already form of register of companies add the Radio Buttons thus leaving the screen:
The part where you save that information in the bank today is that way:
begin
sdsEmpresaCadastro.Close;
sdsEmpresaCadastro.CommandText := 'select * from Empresa where Nome = '''+cdsEmpresaNOME.AsString + '''';
sdsEmpresaCadastro.Open;
if not sdsEmpresaCadastro.IsEmpty then
raise Exception.Create('Empresa já incluída');
cdsEmpresaCODIGO.AsInteger := dmDatabase.NextID('EMPRESA');
dmDatabase.SQLConnection.Execute('INSERT INTO Empresa (CODIGO, NOME, VALORIMPRESSAO, '+
'VALORDIGITALIZACAO, VALORIMPRESSAOEXCEDENTE, CONTATO, NOMEREDUZIDO, CNPJ, ENDERECO, BAIRRO, CEP, '+
'CIDADE, TEFONE, UF, INSCRICAOESTADUAL, CONTATONF, EMAIL, EMAILNF, OBSERVACAO, '+
'FRANQUIADIGITALIZACAO, VALORDIGITALIZACAOEXCEDENTE, STATUS) VALUES ('+
cdsEmpresaCODIGO.AsString+','''+cdsEmpresaNOME.AsString+''','+
TrocaVirgPPto(cdsEmpresaVALORIMPRESSAO.AsString)+','+
iif(cdsEmpresaVALORDIGITALIZACAO.AsString='','0', TrocaVirgPPto(cdsEmpresaVALORDIGITALIZACAO.AsString))+','+
iif(cdsEmpresaVALORIMPRESSAOEXCEDENTE.AsString='','0', TrocaVirgPPto(cdsEmpresaVALORIMPRESSAOEXCEDENTE.AsString))+
','''+cdsEmpresaCONTATO.AsString+''','''+cdsEmpresaNOMEREDUZIDO.AsString+ ''','''+
cdsEmpresaCNPJ.AsString +''','''+cdsEmpresaENDERECO.AsString+''','''+
cdsEmpresaBAIRRO.AsString +''','''+cdsEmpresaCEP.AsString+ ''','''+
cdsEmpresaCIDADE.AsString+''','''+cdsEmpresaTEFONE.AsString+''','''+
cdsEmpresaUF.AsString+''','''+cdsEmpresaINSCRICAOESTADUAL.AsString+ ''','''+
cdsEmpresaCONTATONF.AsString+ ''','''+ cdsEmpresaEMAIL.AsString + ''','''+
cdsEmpresaOBSERVACAO.AsString + ''','''+ cdsEmpresaEMAILNF.AsString+''','+
iif(cdsEmpresaFRANQUIADIGITALIZACAO.AsString='','0', cdsEmpresaFRANQUIADIGITALIZACAO.AsString)+','+
iif(cdsEmpresaVALORDIGITALIZACAOEXCEDENTE.AsString='','0', TrocaVirgPPto(cdsEmpresaVALORDIGITALIZACAOEXCEDENTE.AsString))+')', nil);
end
My question then is: How to verify which of the Radio Buttons is selected to assign to the bank if Status = true or false

