Help on multi user access (mysql)

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dinko
Posts: 8
Joined: Wed 18 Mar 2015 22:22

Help on multi user access (mysql)

Post by dinko » Wed 18 Mar 2015 22:24

How can I automatically update records that has been changed from other user? Calling Refresh every X seconds (timer) its overkill for my app. It should be a way to automatically notified for changes made (insert, update or delete) so I can have an app that would support "live-updates". I am using MySQL.

Thank you in advance

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

Re: Help on multi user access (mysql)

Post by ViktorV » Thu 19 Mar 2015 11:03

MySQL doesn't provide any capability for getting information about changes made by other users without a query to the server. To get this information quickly, you can use the TCustomUniDataSet.RefreshQuick method. Note, that this method requires the table to have a unique key fields and a TIMESTAMP field. See more details about TCustomMyDataSet.RefreshQuick in the MyDAC documentation: http://www.devart.com/mydac/docs/devart ... olean).htm

dinko
Posts: 8
Joined: Wed 18 Mar 2015 22:22

Re: Help on multi user access (mysql)

Post by dinko » Thu 19 Mar 2015 17:24

If I change from mysql what you suggest? Maybe FireBird will help me to make it ever easier and accurate?

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

Re: Help on multi user access (mysql)

Post by ViktorV » Fri 20 Mar 2015 08:52

Firebird implements event support mechanism, that allows to generate messages (e.g., about database modification) on the server side and send them to client applications. See more details about Firebird events in the documentation: http://www.firebirdsql.org/file/documen ... events.pdf
Using UniDAC, you will be able to organize event handling in the application with the TUniAlerter component. See more details about this component in the IBDAC documentation: http://www.devart.com/unidac/docs/devar ... lerter.htm

Post Reply