Oracle DataAccess Lock Code Stops
<p>When I use "Select ... for update" query code stops without exception or any freeze. It just won't go to the next instruction. It work fine for a regular select query. Any idea why ?</p>

<p></p>

<pre><code>string selectQuery = "select * from table_name where id = 1 FOR UPDATE"; // Code stops on data fill
string selectQueryNoLock = "select * from table_name where id = 1"; // Code execute normally
string connectionString = "fake";
OracleConnection oracleConnection = new OracleConnection(connectionString);
Console.WriteLine("Open Connection");
oracleConnection.Open();
OracleTransaction oracleTransaction = oracleConnection.BeginTransaction();
OracleCommand oracleCommand = new OracleCommand(selectQuery, oracleConnection);
oracleCommand.Transaction = oracleTransaction;

OracleDataAdapter dataAdapter = new OracleDataAdapter(oracleCommand);
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet);

// This line is never reached!
Console.WriteLine("Press any key...");
</code></pre>