Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: multi user?
multi user?
Posted: 2007/05/13 07:19
 
hi,
when using AnyDac for multi-user, is there anything I should be aware of?

e.g.,
- when AnyDac goes to edit, does it fully lock the whole table or just the row?

- do I have to trap any events so two users don't edit the same record?

- is there any special processing required, such as making separate ADConnections?

- do you have small example how to use AnyDac in multi-user mode?

thank you.
Re:multi user?
Posted: 2007/05/14 01:48
 
when using AnyDac for multi-user, is there anything I should be aware of?
In general, it is DBMS responsibility to maintain concurrent users access to a data. But application can take care to reduce number of access conflicts. With AnyDAC, you can specify how AnyDAC should lock the record before user will edit it and post the changes. For details see AnyDAC_Architecture.doc, chapter 6.2.3 "Concurrency Control".

- when AnyDac goes to edit, does it fully lock the whole table or just the row?
No, not a table. Only in pessimistic locking mode with immediate locking, AnyDAC will lock current record before starting to edit it.

- do I have to trap any events so two users don't edit the same record?
That is question to the application business logic, than to AnyDAC.

- is there any special processing required, such as making separate ADConnections?
No.

- do you have small example how to use AnyDac in multi-user mode?

No examples. Just build application, adjust locking mode according your application requirements and ... use it

Regards,
Dmitry
Re:multi user?
Posted: 2007/05/17 23:40
 
I read about concurrency control.

so for example,

if I use one TAdQuery, I can set it to Add, Edit, and Delete without causing the multi-user problems?

For example, some people recommend using separate TDatabase for inserts, edits and deletes.

what would your advice be?

thank you.
Re:multi user?
Posted: 2007/05/17 23:54
 
Hello sally

For example, some people recommend using separate TDatabase for inserts, edits and deletes.

No, that is not good idea. Start from using single TADConnection and as much, as you need, TADQuery's. Each TADQuery can Insert/Update/Delete records in own dataset.

Regards,
Dmitry