Example for an integer auto-increment column:
Code: Select all
...
MyStoredProc.Insert;
...
MyConnection.StartTransaction;
MyStoredProc.ApplyUpdates;
// here we can access the value of the auto-increment field, even if the transaction has not been completed yet
// MyIntValue := MyStoredProc.FieldByName('auto-inc-column-name').AsInteger;
...
MyConnection.Commit;
Maybe it's related to the "Update SQL" code generated in Delphi that must be re-generate after the "ORDER BY" has been added to the stored procedure ? No, I just tested that and it does not work either.
Any idea ?