title: ExecuteScalar returns value is not suitable
body: <p>I use Enterprise Library and I have one problem:</p>
  
  <pre><code>string sql = " 
                 UPDATE StackOverflow SET UserName = @UserName
                 WHERE Id = @Id 
               ";
  
  DbCommand cmd = base.Database.GetSqlStringCommand(sql);
  
  base.Database.AddInParameter(cmd, "Id", DbType.Int32, StackOverflow.Id);
  base.Database.AddInParameter(cmd, "UserName", DbType.Int32, StackOverflow.UserName);
  
  int val = Convert.ToInt32(base.Database.ExecuteScalar(cmd));
  
  Convert.ToInt32(base.Database.ExecuteScalar(cmd)) //returns 0.
  </code></pre>
  
  <p>I've read this article <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.executescalar.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.executescalar.aspx</a></p>
  
  <p>The article says:<br>
  <em>The function returns the new Identity column value if a new row was inserted, 0 on failure.</em></p>
  
  <p>but I did not insert into that table - I only want to update and return updated row Id.</p>