2
I have a ADODataSet
with the following consultation
DECLARE @ID_CONTRATO_EMPRESARIAL INTEGER = :ID_CONTRATO_EMPRESARIAL
BEGIN
WITH V1 AS (
select C.ID_CONTRATO,
COUNT(CASE AD.FUNCIONARIO WHEN 'TRUE' THEN 1 ELSE NULL END) FUNCIONARIOS,
COUNT(*) MEMBROS
FROM CONTRATO C, ADESAO AD
WHERE C.ID_CONTRATO_EMPRESARIAL = @ID_CONTRATO_EMPRESARIAL
AND C.ID_CONTRATO = AD.ID_CONTRATO
GROUP BY C.ID_CONTRATO, C.NUMERO, C.VALOR_CLIENTE)
SELECT
V1.FUNCIONARIOS, V1.MEMBROS,
PT.ID_PESSOA AS ID_PESSOA_TITULAR, PT.NOME AS NOME_TITULAR,
C.*
FROM V1, CONTRATO C, PESSOA PT
WHERE V1.ID_CONTRATO = C.ID_CONTRATO
AND C.ID_PESSOA = PT.ID_PESSOA
END
I wonder if I have a way Edit
in that DataSet
and save the changed column in the bank.
Basically what I’m trying to do is this
dmContratoEmpresarial.cdsContratoEmpresarialContratos.Edit;
dmContratoEmpresarial.cdsContratoEmpresarialContratosVALOR_TI.Value := 1000;
dmFramework.Post(dmContratoEmpresarial.cdsContratoEmpresarialContratos);
Where the column VALOR_TI
is on the table CONTRATO
. However when checking the seat the column has not been changed.