|
@@ -987,22 +987,19 @@ var
|
|
end;
|
|
end;
|
|
|
|
|
|
begin
|
|
begin
|
|
- Result := False;
|
|
|
|
- with tsqlquery.Create(nil) do
|
|
|
|
- begin
|
|
|
|
- DataBase := self.Database;
|
|
|
|
- transaction := self.transaction;
|
|
|
|
- sql.clear;
|
|
|
|
|
|
+ Result := True;
|
|
case UpdateKind of
|
|
case UpdateKind of
|
|
ukModify : s := ModifyRecQuery;
|
|
ukModify : s := ModifyRecQuery;
|
|
ukInsert : s := InsertRecQuery;
|
|
ukInsert : s := InsertRecQuery;
|
|
ukDelete : s := DeleteRecQuery;
|
|
ukDelete : s := DeleteRecQuery;
|
|
end; {case}
|
|
end; {case}
|
|
- sql.add(s);
|
|
|
|
- ExecSQL;
|
|
|
|
- Result := true;
|
|
|
|
- Free;
|
|
|
|
- end;
|
|
|
|
|
|
+ try
|
|
|
|
+ (Database as TSQLConnection).ExecuteDirect(s,Transaction as TSQLTransaction);
|
|
|
|
+ except
|
|
|
|
+ on EDatabaseError do Result := False
|
|
|
|
+ else
|
|
|
|
+ raise;
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|