Update Failed

Delphi

05/05/2003

Alguém sabe me dizer, pq a mensagem ´update failed´ ocorre quando tento deletar mais de 1 registro da tabela filho e 1 da tabela pai.

PS: Atualmente meu código está assim, no evento OnClick do botão confirmar:

frmDm.queryFilho.DataSource := Nil;
frmDm.queryFilho.First;

While Not frmDm.queryFilho.Eof Do
frmDm.queryFilho.Delete;

frmDm.queryPai.Delete;
frmDm.queryFilho.ApplyUpdates;
frmDm.queryPai.ApplyUpdates;
frmDm.queryFilho.DataSource :=frmDm.DataSourcePai;
frmDm.dbSistema.Commit;

O erro está ocorrendo em: frmDm.queryFilho.ApplyUpdates;


D4rk Schn31d3r

D4rk Schn31d3r

Curtidas 0

Respostas

Aborges

Aborges

05/05/2003

Exprimente fazer

frmDm.queryFilho.Delete;
frmDm.queryFilho.ApplyUpdates;

frmDm.queryPai.Delete;
frmDm.queryPai.ApplyUpdates;


GOSTEI 0
POSTAR