I have a problem saving the information I select to a RadioGroup
in the Database, after making the change that was suggested in this
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
.