Subject Re: [IBO] pessimisticlocking please
Author Andreas Pohl
If you use following settings, then you'll get a perfect way for multiuser editing without overwriting each other as long as one user is editing a record. After posting a record/row other users are eble to overwrite this.

IB_Query1.Pessimisticlocking:=True;
IB_Query1.IB_Transaction:=IB_Transaction1;

IB_Transaction1.AutoCommit:=True;
IB_Transaction1.ServerAutoCommit:=False;
IB_Transaction1.Isolation:=tiCommitted;

If you catch Errcode 335544336 in IB_Connection1.OnError event you can display a own message like "Another user is doing your work..."

BTW, if your database is firing events after updating/inserting/deleting you can refresh displayed rows (e.g. in a grid) automatically. This looks nice but be carefully with it because your system becomes busy if a lot of user are working (as they should :)

Mit freundlichem Gruss & Best Regards

Andreas Pohl
apohl@...
www.ibp-consult.com
----- Original Message -----
From: "Daniel Bertin" <daniel@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, November 07, 2001 4:34 PM
Subject: [IBO] pessimisticlocking please


> Hi all
>
> I know I asked this before but I'm running into problems with users
> overwriting the other, very few times, but I need to prevent this. but how?
>
> How do I go about locking only one row in the table? will
> Pessimisticlocking property of IBOTable accomplish this? I'm using D5,
> IBOTable,and IB6.
>
> Can Someone please set me straight on this problem once and for all.
>
> Thanks
> Daniel
> Daniel Bertin
> New Generation Software
>
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>