Page 1 of 1

Problem with TransactIsolationLevel tiSerializable

Posted: 25.01.2006, 17:09
by jascha
I have written a multiuser adressbook, with todo list. I use TransactIsolationLevel tiSerializable so that one user can not overwrite changed someone made on the same Record while he was editing it. This works all fine.
Now I want, that each user gets a notification, when he gets a new todo. For this I poll the Table every 10 seconds. Now the problem is, that I don't get changed someone else made to that table. At least not until I do insert something to it.
I use a seperate ZQuery for it.

If I use TransactIsolationLevel tiNone everything works.

Posted: 26.01.2006, 11:02
by zippo
Hmmmm....

You're saying that even if another user actually made a change, there'e no difference until you post something in the same table? I don't know much about TrasnsactIsolationLevel, so I'll try to show you other ways to do the same job done.

As first, try to reconsider the usage of TrasnsactIsolationLevel. If everything is done by one Query.Post, then there's no need for TrasnsactIsolationLevel, because all the changes are committed in the POST procedure.

You coulds also try to use CachedUpdates on the client-side.

Do your users really touch other's TO-DO's? Ask yourself if the complex mechanism for licking is really needed, because how many chances are that two users edit the same record on the same time. If there's quite some chance, then go on, otherwise keep it simple and just use POST. But this is just a suggestion, so don't get angry :)

Posted: 26.01.2006, 13:31
by ssamayoa
Before open polling table, commit and start a new transaction.

Regards.

Posted: 26.01.2006, 15:30
by jascha
zippo wrote:Do your users really touch other's TO-DO's? Ask yourself if the complex mechanism for licking is really needed, because how many chances are that two users edit the same record on the same time. If there's quite some chance, then go on, otherwise keep it simple and just use POST. But this is just a suggestion, so don't get angry :)
Its not because of the Todos, its because of the Adressdata where it has already happened that 2 Persons edit the same Adress during the same time

Posted: 26.01.2006, 15:38
by jascha
ssamayoa wrote:Before open polling table, commit and start a new transaction.

Regards.
This worked! Thank You!
It is a bit a hack, because i use AutoCommit:=true
I now do the following

ZConnection.AutoCommit:=false;
ZConnection.Commit;
ZConnection.StartTransaction;

do my query

ZConnection.Commit;
ZConnection.AutoCommit:=true;