title: Get Identify specification of Insert Query ado.net
body: <p>I am inserting records in table with inline query.I have to get Identity generated by Insert statement by using Output Parameter, this is how I am doing</p>
  
  <pre><code>//Com.CommandText contains Insert Statment
       OleDbParameter IDParameter = new OleDbParameter("@ID", OleDbType.Integer);
                      IDParameter.Direction = ParameterDirection.Output;
                      Com.Parameters.Add(IDParameter);
  Com.ExecuteNonQuery();
  </code></pre>
  
  <p>After executing when I am checking the output parameter value,its appearing 0, althought record is inserting properly
  this is how I am checking</p>
  
  <pre><code>Com.Parameters[0].Value
  </code></pre>
  
  <p>I also tried this</p>
  
  <pre><code>Com.Parameters["@ID"].Value
  </code></pre>
  
  <p>But output parameter value is always 0
  I also tried using Select Scope_Identity() inside Insert statment but no luck,
  I have also triend ExecuteScalar() but still same issue</p>