From: Jiří Č. <ji...@ci...> - 2015-07-22 06:38:10
|
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:rds...@gm...] Sent: Tuesday, July 21, 2015 12:48 PM To: fir...@li... 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 |