Subject | Dirty Read |
---|---|
Author | andrew.pailthorpe@btinternet.com |
Post date | 2013-09-11T07:39:39Z |
Hi All
I'm using C# and Firebird Database 2.5 and Firebird Client 2.5.1
I'm trying to read a specific record that is currently being updated but the same record appears to be locked. I cant read it. My code just hangs.
This is an example code I've put together:-
FB_Connection AnotherConnection = new FB_Connection(tbDB_Path.Text, Con_DB_Default_DataSource, Con_DB_Default_UserID,
Con_DB_Default_Password, Con_DB_Default_Port);
AnotherConnection.Connection.Open();
// Start our Transaction
FtrUpdate = My_FB_Connection.Connection.BeginTransaction (System.Data.IsolationLevel.ReadUncommitted);
ApplySQL("UPDATE EMPLOYEES_TABLE SET DISPLAY_NAME = 'TOM' WHERE ID = 26", FtrUpdate);
FdaGeneral = new FbDataAdapter("Select * from EMPLOYEES_TABLE WHERE ID = 26", AnotherConnection.Connection);
FdaGeneral.Fill(FdsGeneral);
MessageBox.Show(FdsGeneral.Tables[0].Rows.Count.ToString();
It doesn't matter what type of isolation level I use the specific record seems locked.
I've used Delphi in the past and had no problems.
I'm not even explicitly locking the record when updating.
Any Ideas?
Thanks
I'm using C# and Firebird Database 2.5 and Firebird Client 2.5.1
I'm trying to read a specific record that is currently being updated but the same record appears to be locked. I cant read it. My code just hangs.
This is an example code I've put together:-
FB_Connection AnotherConnection = new FB_Connection(tbDB_Path.Text, Con_DB_Default_DataSource, Con_DB_Default_UserID,
Con_DB_Default_Password, Con_DB_Default_Port);
AnotherConnection.Connection.Open();
// Start our Transaction
FtrUpdate = My_FB_Connection.Connection.BeginTransaction (System.Data.IsolationLevel.ReadUncommitted);
ApplySQL("UPDATE EMPLOYEES_TABLE SET DISPLAY_NAME = 'TOM' WHERE ID = 26", FtrUpdate);
FdaGeneral = new FbDataAdapter("Select * from EMPLOYEES_TABLE WHERE ID = 26", AnotherConnection.Connection);
FdaGeneral.Fill(FdsGeneral);
MessageBox.Show(FdsGeneral.Tables[0].Rows.Count.ToString();
It doesn't matter what type of isolation level I use the specific record seems locked.
I've used Delphi in the past and had no problems.
I'm not even explicitly locking the record when updating.
Any Ideas?
Thanks