title: Can I see the actual query generated when using OracleParameters with OracleCommand?
body: <p>I want to use ODP.NET to run various queries on an oracle database and I'd like to use parameters in the query. Here's a trivial example snippet (omitting all the obvious setup bits of the <code>OracleConnection</code>):</p>
  
  <pre><code>string query = "SELECT FIRSTNAME FROM EMPLOYEES WHERE LASTNAME=:pNAME";
  OracleCommand command = new OracleCommand(query);
  command.Parameters.Add(":pNAME", OracleDBType.Varchar2).Value = "O'Brien";
  </code></pre>
  
  <p>My question is, is there anyway to see the query that gets generated from this? I know this is a simple example and the output is probably very obvious, but I'm trying to see how it actually handles things like escaping characters such as the <code>'</code> in O<code>'Brien</code>. And of course in the future if my queries get more complicated and I'm getting sql errors, I thought I might be able to use the generated query to debug. </p>
  
  <p>Any help or pointers is greatly appreciated!</p>