Error saving data from a RadioGroup

1

I have a problem saving the information I select to a RadioGroup in the Database, after making the change that was suggested in this

asked by anonymous 11.01.2017 / 19:23

1 answer

2

I see that you have a column DESCRICAO just above the status, it also needs QuotedStr

Staying like this

var update: string;
begin
  update =
        ' UPDATE Suprimento ' +
        ' SET SUPRIMENTO = ' + QuotedStr(cdsSuprimentoSuprimento.AsString) +
        '   , CAPACIDADE = '+ cdsSuprimentoCapacidade.AsString +
        '   , CODIGOTIPOSUPRIMENTO = '+ cdsSuprimentoCODIGOTIPOSUPRIMENTO.AsString +
        '   , QUANTIDADEML = '+ QuotedStr(cdsSuprimentoQuantidadeML.AsString) +
        '   , PARTNUMBER = '+ QuotedStr(cdsSuprimentoPartNumber.AsString) +
        '   , DESCRICAO = '+ QuotedStr(cdsSuprimentoDESCRICAO.AsString) +
        '   , STATUS = '+ QuotedStr(cdsSuprimentostatus.AsString)+
        '   , ESTOQUEMINIMO = '+ cdsSuprimentoEstoqueMinimo.AsString +
        ' WHERE CODIGO = '+cdsSuprimentoCodigo.AsString;

  dmDatabase.SQLConnection.Execute(update, nil);
end;

Whenever you have a field that is Varchar , try to use QuotedStr .

    
12.01.2017 / 11:19