I ve got a problem with an Edit/Post in the following case:
Code: Select all
Options.StrictUpdate := true;
SQL.ADD('SELECT *');
SQL.ADD('FROM TABLE WHERE Key1=:Key1');
SQL.ADD('AND Month=:Month');
SQL.ADD('AND Year=:Year');
ParamByName('Key1').AsInteger := Key1;
ParamByName('Month').AsInteger := Month;
ParamByName('Year').AsInteger := Year;
Open;
First;
while not EOF do
begin
Edit;
FieldByName('Monat').AsInteger := NextMonth;
FieldByName('Jahr').AsInteger := NextYear;
//RowsAffected = -1
Post;
//RowsAffected = 0
Next;
end;
Close;but the Record is changed, so the Update didn't failed, only RowsAffected seems to show the wrong value, its RowsAffected=0
Version: Devart SDAC 4.70.0.47 for Delphi 2007 for Win32.
Please help me. Thanks!