MyConecction.ApplyUpdates?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cybsistemas
Posts: 118
Joined: Mon 12 Sep 2005 17:31
Location: Argentina

MyConecction.ApplyUpdates?

Post by cybsistemas » Fri 29 Jan 2016 06:35

Using Delphi XE7 with MyDAC 8.6.20. The database is in an on VPS with Centos 7 and MySQL 5.6.27. The problem I have is that after an INSERT statement close the application and the information is not saved. What statement can be used to force the program to save the changes to disk ?.
Thank you

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

Re: MyConecction.ApplyUpdates?

Post by ViktorV » Fri 12 Feb 2016 11:12

If you change data (e.g., insert, update, delete), it is always saved in a database automaticly, unless you use transactions. But if you execute the StartTransaction method, then to save data to a database, you should execute the Commit method.
There are several hints that may help to determine the reason of data lost:
- if you are using CachedUpdates=True, check that you perform ApplyUpdates;
- if you are using the FetchAll=False mode, note that committing transactions in the main session will not save changes. For more information, please read the FetchAll property description in the MyDAC documentation: https://www.devart.com/mydac/docs/?deva ... chall.htm.

Post Reply