DataReader EOF?

Posted on 2007-08-07
Last Modified: 2013-11-07
Is there any way with a .NET DataReader to tell when you are working with the last record? Something like EOF in classic ASP.
Question by:DerekWatling
    LVL 142

    Accepted Solution

    not really. you usually do (c#):

    while (
      // process current record...


    Author Comment

    I'm doing that in VB. Inside the WHILE loop I want to have something like IF MyReader.EOF THEN ...
    LVL 39

    Assisted Solution

    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?

    Author Comment

    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

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now