Hi,
I want the dataReader to display the number of rows,
Is this possible in Vb.Net?
Thanks for the help!
Hi,
I want the dataReader to display the number of rows,
Is this possible in Vb.Net?
Thanks for the help!
Hi,
I tried for this but with following code I get no. of columns not the rows.
Code:m_cnt = m_drd.getSchemaTable.rows.count
Please visit this webpage.
http://www.devx.com/vb2themax/Tip/18807
I hope this helps!
A DataReader should be used wherever you need forward-only, read-only access to the data, regardless of how much there is. If you need to make updates to the data and send it back to the database then a DataAdapter is the appropriate choice, but if you just need to get each row, use its data and discard it then a DataReader is the way to go. To answer the original question (again), the DataReader doesn't know how many rows there are ubtil it's read them, so you can't know how many rows there are until you've finished using the DataReader. A DataAdapter can tell you how many rows there are because it has already retrieved them all when Fill returns.
Bookmarks