Getting MySQL record count with C#
Posted
by she hates me
on Stack Overflow
See other posts from Stack Overflow
or by she hates me
Published on 2010-05-11T00:09:11Z
Indexed on
2010/05/11
0:14 UTC
Read the original article
Hit count: 316
Hello,
I would like to know how can I get record count of a query with C#.
Here is the code that I use..
MySqlDataReader recordset = null;
query = new MySqlCommand("SELECT * FROM test ORDER BY type_ID ASC", this.conn);
recordset = query.ExecuteReader();
while (recordset.Read())
{
result.Add(recordset["type_ID"].ToString());
}
return result;
© Stack Overflow or respective owner