Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1728
  • Last Modified:

DataReader EOF?

Is there any way with a .NET DataReader to tell when you are working with the last record? Something like EOF in classic ASP.
  • 2
2 Solutions
Guy Hengel [angelIII / a3]Billing EngineerCommented:
not really. you usually do (c#):

while (dataread.read())
  // process current record...

DerekWatlingAuthor Commented:
I'm doing that in VB. Inside the WHILE loop I want to have something like IF MyReader.EOF THEN ...
read method advances the record pointer to next available record and returns tru. once the pointer reaches the last record next read will return you false.
what exactly are you trying to do?
DerekWatlingAuthor Commented:
For formatting I wanted to know when I was on the last record. Using CSS I have managed to get what I want after the fact.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now