ADO equivalent of .EOF

TheWizardofInt

Well-known member
Joined
Dec 31, 1969
Messages
333
Location
Orlando, FL
I used the stock code to open my SQL table and return the dataset "User" where a Username and Password match what is entered on a login screen

Using a SQL query I return a dataset from the function.

I now want to know if the dataset is empty or not.

Anyone know how to actually READ the field values in ADO.net? I am going nuts with this

Thanks
 
Are you using a DataAdapter? If so, you should check the return
value from the Fill method when you use it to populate your
dataset. Once you have used Fill, a new Table object will have
been added to the DataSet Tables collection. The Table object
has both a Rows and a Columns collection. As each Row object
is selected, the Columns objects have the values for that Row.
This is all just theory to me that I got from MSDN and an ADO.Net
reference. However, it makes sense to me, and I expect it works
pretty much as described.
 
In a case like this where no data is ever displayed (as far as I know) Id suggest using a DataReader object instead, the .Read method returning False if no data has been returned.
 
Back
Top