In delphi code i am have:
qryT := TMSQuery.Create(self);
qryT.Connection := dmCS.databaseCS;
qryT.Close;
qryT.SQL.Clear;
qryT.sql.add('select * from tabela');
qryT.open;
qryT.edit;
qryT.fieldbyname('gaga').asstring:='A';
qryT.post;
and........Message:
Update failed, found 2 row.
Why???????? All is corect. This is worked with Dao components and with Microsoft Jet. Why dont work with SDAC.
i havedelphi 6.0 sdac 3.55.0.16 and SqlServer 2000
What is this????
Only one row.Paul wrote:We cannot reproduce this problem with your example. Please check that table did not contain duplicate rows before.
Here is pure procedure
procedure TfrmGlavniMeniCS.Button1Click(Sender: TObject);
var qryT: TMSQuery;
begin
qryT := TMSQuery.Create(self);
qryT.Connection := dmCS.databaseCS;
qryT.SQL.Add(' SELECT top 1 * ');
qryT.SQL.Add(' FROM tabela');
qryT.Open;
qryT.Edit;
qryT.FieldByName('gaga').AsFloat := 10;
qryT.Post;
end;
Only one row.
and........Message:
Update failed, found 2 records
if i write:
update tabela set gaga=10 where .....
this work
I can reproduce this problem when I open Enterprise Manager and add duplicate row equivalent to the first one in the table "tabla". Than when I press TfrmGlavniMeniCS.Button1Click I receive this error message. When I execute "update tabela set gaga=10 where ..." this error does not occur, because SDAC does not perform any checking for direct executions.
What rows do you have in table "tabla"? What version of SDAC do you use?
What rows do you have in table "tabla"? What version of SDAC do you use?