Recent

Author Topic: [ASK] How to detect pending changes with Zeos?  (Read 1493 times)

Fahmy Rofiq

  • Jr. Member
  • **
  • Posts: 72
[ASK] How to detect pending changes with Zeos?
« on: February 26, 2015, 04:32:47 am »
Hi,
I am using Zeos with Firebird. On application exit, I want to ask user to commit change if there are any changes on Firebird database. How to detect if user have made any changes to database, so dialog box only appear only if needed?

Thanks.
Lazarus + FPC Trunk
Windows 10 x64

kapibara

  • Hero Member
  • *****
  • Posts: 532
Re: [ASK] How to detect pending changes with Zeos?
« Reply #1 on: February 26, 2015, 07:37:00 am »
Check out the State and UpdateStatus properties of the Dataset:

http://wiki.lazarus.freepascal.org/Databases#Dataset_State

EDIT: Just noticed that ZQuery also has a UpdatesPending property. That seems to be what you need.
« Last Edit: February 26, 2015, 06:30:36 pm by kapibara »
Lazarus trunk / fpc 3.0.4 / Debian 10 - 64 bit

 

TinyPortal © 2005-2018