I have a couple basic questions about ADO.Net datareaders and how they relate to the older Recordsets from ADO.
1.) How do you test to see if the Dtareader contains any data?
In ADO, you would open a recordset and check for EOF.
I don't see anything similar with the Datareader.
To loop in ADO you would "Do While Not EOF" and then have a "MoveNext" at the bottom of the "Loop".
I looks like the Datareader has the same loop functionality with "While myReader.Read()" function. But how do you do an initial test for emptiness without looping?
2.) Can a DataReader see changes made in subsequent rows by other users?
In ADO, this was done by opening the recordset with the "ADODB.CursorTypeEnum.adOpenDynamic" option.
I can't find anything similar with the DataReader.
I read that it only retrieves one row at a time, but I didn't understand if that was just referring to stepping though the data on the client side, or whether that meant retrieving the data from the server.
If I open a query with a datareader and Read the first row, and then another user changes what will end up being my 5th row, when I get to Read that 5th row, will I see their changes?
Thanks.
1.) How do you test to see if the Dtareader contains any data?
In ADO, you would open a recordset and check for EOF.
I don't see anything similar with the Datareader.
To loop in ADO you would "Do While Not EOF" and then have a "MoveNext" at the bottom of the "Loop".
I looks like the Datareader has the same loop functionality with "While myReader.Read()" function. But how do you do an initial test for emptiness without looping?
2.) Can a DataReader see changes made in subsequent rows by other users?
In ADO, this was done by opening the recordset with the "ADODB.CursorTypeEnum.adOpenDynamic" option.
I can't find anything similar with the DataReader.
I read that it only retrieves one row at a time, but I didn't understand if that was just referring to stepping though the data on the client side, or whether that meant retrieving the data from the server.
If I open a query with a datareader and Read the first row, and then another user changes what will end up being my 5th row, when I get to Read that 5th row, will I see their changes?
Thanks.
