Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

DataTable.Load(DataReader) Return incorrect numbers of rows (no replies)

$
0
0
I always used this method to load records from a select(with join) statement.
But I found an error...The number of returned rows are incorrect.

I tried this:
public DataTable returnDataTable(string strSql, List<MySqlParameter> p_objParams)
{
MySqlCommand objCmd = new MySqlCommand(p_strSql, objConn);

foreach (MySqlParameter param in p_objParams)
objCmd.Parameters.Add(param);

DataTable tbRet = new DataTable();
MySqlDataReader dr = objCmd.ExecuteReader();
tbRet.Load(dr);
return tbRet;
}

Are there known bug with DATATABLE.LOAD(DataReader) ?

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>