[Lazarus] SQLDb and TSQLQuery usage for MSSQL database...
Michael Van Canneyt
michael at freepascal.org
Thu Feb 25 10:25:56 CET 2016
On Thu, 25 Feb 2016, Bo Berglund wrote:
> On Thu, 25 Feb 2016 08:57:40 +0100 (CET), Michael Van Canneyt
> <michael at freepascal.org> wrote:
>
>>>
>>> It seems like in some examples one uses the transaction as follows:
>>> ATransaction.StartTransaction;
>>> .. do database stuff ...
>>> ATransaction.Commit;
>>>
>>
>> In general it is better to explicitly handle your transactions.
>> However, if you don't do that, then SQLDB will do it for you.
>
> So as long as there is a TSQLTransaction object hooked to the
> connection and query (same transaction object) then the built-in
> system will do the StartTransaction-Commit sequence in the background
> if I do not explicitly code for it?
StartTransaction, yes.
Commit: I do not think so (would need to check).
Michael.
More information about the Lazarus
mailing list