Page 1 of 1

MYSQL AUTOREFRESH

Posted: 03.09.2009, 11:39
by raosistemas
when i update a record in one station, i can't see this update or insert in a second machine.
There is an automatic way to update de information inserted/edited in another machine?

I tried:

tztable.refresh.... after scroll event... but it hangs...

Thanks.

Re: MYSQL AUTOREFRESH

Posted: 04.09.2009, 17:11
by Ðerek wildstar
raosistemas wrote:when i update a record in one station, i can't see this update or insert in a second machine.
There is an automatic way to update de information inserted/edited in another machine?

I tried:

tztable.refresh.... after scroll event... but it hangs...

Thanks.
Olá!

Você tem de ver o nível de isolamento transacional que você tá usando...

Se você tá usando transações, alguns isolamentos fazem com que isso aconteça, pois todos (com exceção de você que fez a alteração em uma tabela) só irão ver as alterações quando você as persistir (commit).

Se você não estiver usando transações, procure deixar a propriedade AutoCommit do ZConnection como true e a propriedade TransactIsolationLevel como tiReadUncommited.

Talvez isso resolva.

PS.: É tiReadUNcommitted, que segundo o manual do MySQL permite as chamadas "leituras sujas" onde todos conseguem ver todas as alterações não persistidas de todos os outros clientes. NOTE QUE ISSO NEM SEMPRE É UMA BOA IDÉIA. Considere mudar o paradigma da sua aplicação, entendendo melhor como as transações funcionam caso deseje usá-las.

Posted: 05.09.2009, 00:23
by mdaems
Ðerek,

It's fine to help people in portuguese, but the condition is that you give at least a summary in english for those poor forum visitors who don't understand your universal language.

Mark

Posted: 08.09.2009, 12:51
by Ðerek wildstar
mdaems wrote:Ðerek,

It's fine to help people in portuguese, but the condition is that you give at least a summary in english for those poor forum visitors who don't understand your universal language.

Mark
Sorry... AGAIN...

The sollution was to pay attention at the transact Isolation Level and the way to do the updates on the application because the guy (raosistemas) want to see the modifications immediatelly on every station. So i said him to learn about transactions and it isolation levels.

Re: MYSQL AUTOREFRESH

Posted: 04.04.2018, 15:37
by mansch1943
Hallo,

I have the same problem as raosistemas has. I searched and searched ... the summary of Derek wildstar won't help me.

Situation:
Mysql-Server, DataBase, Table. My programming language is Lazarus and I use Zeos 7.1. No problem if I connect to the server, add, delete, change data.

Now I try to connect from another computer and so I have to think about simultaneous fetching and changing data. I wanted to avoid to change the same record twice - so to lock a record and I want to know whether a record is changed by the other computer. Always then last Post is saved in MySql and Refresh hangs ...

How can I lock records in TZTable to the other computer and how can I get the changes from the other computer? Is there an example for this?

Let's thank for every help just now!
Manfred

Re: MYSQL AUTOREFRESH

Posted: 06.04.2018, 08:34
by Fr0sT
If MySQL allows this feature, you can set your transaction options to "no wait" and catch exception on Post.