Autocommit in UniConnection

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MrBlues
Posts: 1
Joined: Thu 23 Mar 2017 12:51

Autocommit in UniConnection

Post by MrBlues » Thu 23 Mar 2017 13:05

Hallo,
we are using MariaDB with Unidac Components 6.4.14 with Delphi 10 Seattle. The database option Autocommit is set to off. Now I want to set the Auticommit to ON for my Application. So I set the Option Autocommit in the UniConnection to true. But if I try to update a table the changes don't take place. I thought this option overides the autocommit setting for this Connection?
How it is possible to set the autocommit for a defined Connection.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Autocommit in UniConnection

Post by ViktorV » Mon 03 Apr 2017 10:25

When working with MariaDB (MySQL) server the TUniConnection.AutoCommit property is not used. To solve the issue you can execute the following code:

Code: Select all

  UniConnection.ExecSQL('SET autocommit = 1');

Post Reply