Quantcast
Channel: Getting started with SQL Server forum
Viewing all articles
Browse latest Browse all 9243

Dirty Reads

$
0
0

Hi All

I'm trying to do a Dirty Read ie

Updating a specific record in the Database  

Then trying to read the same record prior to the Update Transaction being Committed. 

Ive tried all the different Isolation levels (System.Data.IsolationLevel) but the record is locked. 

Any ideas why? 

And any examples

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());

tia


Viewing all articles
Browse latest Browse all 9243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>