hello,
I added the following trigger code MyDump component.
Are you missing something?
procedure BackupTRIGGER(TableName: _string);
var
s: _string;
PorF: _string;
begin
MyQuery.SQL.Text := 'SHOW TRIGGERS LIKE ''' + TableName + '''';
MyQuery.Execute;
if (MyQuery.RecordCount -1 - 1) then
begin
Repeat
PorF := MyQuery.Fields[0].AsString;
Add('DELIMITER $$');
s := MyQuery.Fields[3].AsString;
{$IFDEF CLR}
s := StringReplace(s, #$A, LineSeparator, [rfReplaceAll]);
{$ENDIF}
Add ('CREATE TRIGGER ' + PorF + ' ' + MyQuery.Fields[4].AsString + ' ' + MyQuery.Fields[1].AsString +
' ON ' + MyQuery.Fields[2].AsString + ' FOR EACH ROW');
AddLineToSQL (s);
Add('DELIMITER ;');
Add('');
MyQuery.Next;
Until MyQuery.Eof;
end;
end;
---------------------------
procedure BackupTable(
TableName: _string;
TableNum: integer;
IsView: boolean
);
...
procedure GetCurrentRow(CurrentRowSB: AnsiStringBuilder);
...
BackupTRIGGER(TableName);
if Assigned(FOnBackupProgress) then
FOnBackupProgress(Self, TableName, TableNum, TableCount, 0);
end;
...