Don’t do that. Database engine (any) people do a great effort to reach maximum 
throughput and you want to limit it to basically 1. If you need someething like 
that, your design has serious flaw.

--
Mgr. Jiří Činčura
Independent IT Specialist

From: LtColRDSChauhan [mailto:rdsc1...@gmail.com]
Sent: Tuesday, July 21, 2015 12:48 PM
To: firebird-net-provider@lists.sourceforge.net
Subject: [Firebird-net-provider] Read allowed despite locking table in 
transaction

Hello,

Earlier, by mistake I sent an incomplete mail on this issue. Apologies for the 
same.

1.  I want to lock a table then :
     (a) read a record from this table and then
     (b) write a record to this table.
2.  While I do the above, I want to disallow read and write to this table.
3.  The below mentioned code allows read while the transaction is in progress.

                    tx = con.BeginTransaction(
                        new FbTransactionOptions() {
                            TransactionBehavior = 
FbTransactionBehavior.Consistency | FbTransactionBehavior.NoWait,
                            LockTables = new Dictionary<string, 
FbTransactionBehavior> {
                                {lockTable1, FbTransactionBehavior.Protected | 
FbTransactionBehavior.LockRead | FbTransactionBehavior.Exclusive}
                            }
                        }

4.  Environment :
    (a) FirebirdSql.Data.FirebirdClient-4.6.4.0
    (b) Firebird-2.5.4.26856_0_Win32
    (c) .NET 4.5.2
5.  Please help.

Thanks and Regards,
Rajiv
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to