On Wed, 7 Aug 2013, Chris Crori wrote:

Thanks! :)
I just reinstalled my Operating systems so i haven't looked up the trunk for a while, i guess i have to!!! :P The main idea is to build a form that "autosaves" any changes, so i have to explicitly call just rollback uppon cancelation. Is there another reason to prefer to call Commit myself?

Yes. The data in the form may be invalid, in which case the insert/update/whatever may fail.

Michael.

-----Αρχικό μήνυμα----- From: Michael Van Canneyt
Sent: Wednesday, August 07, 2013 11:49 AM
To: Lazarus mailing list
Subject: Re: [Lazarus] TSQLTransaction.Action property not implemented



On Wed, 7 Aug 2013, Chris Crori wrote:

Hi guys,
i was under the impression that the “Action” property had a value in TSQLTransaction component... correct me if i am wrong but in testing i did and in code (sqldb.pp) i saw that it doesn’t matter the value i put in the property, the default action when a transaction closes is rollback.

And now the question part
    a) am i right?

Yes.

    b) is this a todo?

No, it is already done in trunk.

    c) is there a timeline?

It is done.

In SQLDB, it is better to call explicitly Commit, Rollback or RollBackRetaining.
It may require a typecast:

(Q.Transaction as TSQLTransaction).Commit;

Unless you have the transaction object declared somewhere, in which case you don't need the typecast.

Michael.





--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to