title: select from table with row number to c# datatable gives an error
body: <p>i use <strong>MySQL</strong>
  i have a mysql table.<br>
  And i want to select all records with row numbers.<br>
  and for this i use this sql command.  </p>
  
  <pre><code>SELECT @row := @row + 1 as row, t.* FROM t_persons t, (SELECT @row := 0) r
  </code></pre>
  
  <p>but when i try to run the command and load data to datatable like below  </p>
  
  <pre><code>DataTable dt = new DataTable();
  command.CommandText = sql;
  adapter.SelectCommand = command;
  adapter.Fill(dt);
  </code></pre>
  
  <p>it gives an error like <strong>Fatal error encountered during command execution.</strong><br>
  But when i try this command in phpmyadmin it works fine. So what is the problem. And how to solve it.
    Thanks...</p>