I encountered a problem that IB_Script returned an error while running a longer script:
SQL Error Code = -104 Unexpected end of command - line 18, column 52
As long as the number of characters in the script did not exceed 65,536 characters (current is 66.186), there was no such error message.
I upload IB_Script with the following code:
with dm.DDLScript do
begin
try
SQL.Clear;
SQL.Add('SET TERM ^;');
SQL.Add(Format('CREATE OR ALTER PACKAGE %s', [ObjectName]));
SQL.Add('AS');
SQL.AddStrings(hdr.Lines); // hdr > TSynEdit
Execute;
SQL.Clear;
SQL.Add('SET TERM ^;');
SQL.Add(Format('RECREATE PACKAGE BODY %s', [ObjectName]));
SQL.Add('AS');
SQL.AddStrings(bdy.Lines); // bdy > TSynEdit
SQL.Add('^');
Execute;
ObjectMod := false;
except
on e:exception do
begin
messageDlg(e.Message, mtError,[mbOk], 0);
abort;
end;
end;
end;
Has anyone encountered a similar problem? It is not possible to run the script in a smaller number of characters because it would be a PACKAGE BODY as shown.