MYSQL AUTOREFRESH

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

raosistemas
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 03.09.2009, 11:35
Location: Jundiaí
Contact:

MYSQL AUTOREFRESH

Postby raosistemas » 03.09.2009, 11:39

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.

Ðerek wildstar
Junior Boarder
Junior Boarder
Posts: 35
Joined: 30.08.2005, 16:30
Location: Olinda / PE
Contact:

Re: MYSQL AUTOREFRESH

Postby Ðerek wildstar » 04.09.2009, 17:11

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.

User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Postby mdaems » 05.09.2009, 00:23

Ð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
Image

Ðerek wildstar
Junior Boarder
Junior Boarder
Posts: 35
Joined: 30.08.2005, 16:30
Location: Olinda / PE
Contact:

Postby Ðerek wildstar » 08.09.2009, 12:51

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.

mansch1943
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 04.04.2018, 13:39

Re: MYSQL AUTOREFRESH

Postby mansch1943 » 04.04.2018, 15:37

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

Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 120
Joined: 08.05.2014, 12:08

Re: MYSQL AUTOREFRESH

Postby Fr0sT » 06.04.2018, 08:34

If MySQL allows this feature, you can set your transaction options to "no wait" and catch exception on Post.


Return to “MySQL”

Who is online

Users browsing this forum: No registered users and 0 guests