updatebatch


2004-12-09 12:52:48 AM
delphi43
Hello,
{ CommandType := cmdText;
LockType := ltBatchOptimistic;
CursorLocation := clUseClient;
CursorType := ctStatic;}
ADODataSet1.CommandText := 'select h.codigo,h.nome, h.codtipo, t.descricao
from historico, tipo t where h.codtipo = t.codtipo';
ADODataSet1.Open;
ADODataSet1.Append;
ADODataSet1.FieldByName('codigo').Value := 2;
ADODataSet1.FieldByName('codtipo').Value := 1;
ADODataSet1.FieldByName('nome').Value := 'abc';
ADODataSet1.Post;
ADODataSet1.UpdateBatch(arAll);
how when I make updatebatch it tries to insert one field in
the table tipo.
codtipo = 1 already this registered in cadastre
Marcio