0

I have a Schrodinger code .

I have this Xmlport to import data. If I catch the result, it's always False and the data obviously is not committed. If I don't catch it, it works fine, there is no error raised and the data is correctly registered:

Catching it:

tempBlob.CreateInStream(inStreamObj);
if Xmlport.Import(idXmlport, inStreamObj) then begin
    // Never enters here!!!
    exit(true);
end else begin
    // Returns always False, nothing is imported.
    exit(false);
end;

Without catching it:

tempBlob.CreateInStream(inStreamObj);
Xmlport.Import(codigoXmlport, inStreamObj); // <- This works fine!
exit(true);

I need to catch the result because it's an automatic queue, I don't want it to raise an unmanaged error to stop the process. But is sabotaging me.

I have tested and debugged the 2 codes, same function, same parameters, I don't use globals... and the outcome is different by only making the call inside the conditional.

  • try something like this:if Xmlport.Import(idXmlport, inStreamObj) then begin // Never enters here!!! exit(true); end else begin Message('%1',GetLastErrorText()); exit(false); end; – serkanh Jul 12 '23 at 15:56
  • Thank you @serkanh i have tried it and i receive this error message: "An error occurred and the transaction was stopped. Please contact your administrator or partner for further assistance." – Sihoomid Jul 17 '23 at 14:27

0 Answers0