record count
record count
(OP)
Hi everybody,
i wanna learn how to get count data of SqlDataReader.
here is my code;
cmd1 = new SqlCommand(" select cre_usr,cre_date,orders from orderr ", conn);
rdr = cmd1.ExecuteReader();
after that i need to know recordcount
thanks.
i wanna learn how to get count data of SqlDataReader.
here is my code;
cmd1 = new SqlCommand(" select cre_usr,cre_date,orders from orderr ", conn);
rdr = cmd1.ExecuteReader();
after that i need to know recordcount
thanks.
RE: record count
CODE --> c#
RE: record count
i can not see rows.Count for SqlDataAdapter ?
RE: record count
CODE --> C#
Wrote this quick out of my head without compiling but for most part should work.
DataTable is different from DataReader as the DataReader only goes forward and doesn't really know ahead of time how many rows exist. DataTable loads a "table" based on your query into memory so it contains a row count. I have been programming in .NET for years and have never used DataReader myself although I have worked on programs that have used it. I prefer DataTables or DataSets.
Randy
RE: record count
Zameer Abdulla
RE: record count