Page 1 of 1

Zeos multiuser and transaction support code

Posted: 22.07.2010, 08:00
by JD
Can anyone give me details on how Zeos handles multiuser and transaction support in a network environment?

If it is possible to have some working code samples, I'd really appreciate it. I've been Googling for a while now but I'm not really satisfied with the little information that I found. Thanks a million.

Posted: 29.08.2010, 23:44
by mdaems
JD,

What kind of info are you looking for?
Every connection is using a different transaction. So when each user uses it's own connection there should be no multiuser issues. Each connection behaves like it's the only one using the database.

Mark

Posted: 30.08.2010, 07:24
by Wild_Pointer
JD,

from my experience with Zeos + Postgres I'll advice you not to use single connection object in several threads. I don't know what database management system are you working on, but libpq does not support this (I found that out the hard way). So check your DB provider :)

Good luck.

Posted: 17.01.2011, 20:15
by JD
Sorry for the late, late response. In essence, I want to better understand how Zeos handles database transactions and how to write failsafe code for users attempting to modify the same item of data.

If I understand what Wild Pointer & mdaems have said above, it would be better for me to create a new data module (with data connection, queries, stored procedures etc) running in its own isolated thread for every user attempting to connect to the database. That sounds logical.

However, I still need some examples of Zeos code to handle stuff like transaction rollback if an error occurred.

By the way, I'm using Firebird 2.1.3 & PostgreSQL 9.

Thank you for your kind assistance.

Posted: 17.01.2011, 20:39
by Wild_Pointer
JD,

I'll sugest you read http://zeos.firmos.at/kb.php?mode=article&k=9 That will give you several thoughts to start with when using Postgresql.

Good luck!

Posted: 17.01.2011, 20:58
by JD
Thanks for the link, Wild_Pointer