You could try (in both senses!)

        int readRecordsCount = 0;
        while(reader.Read())
        {
                // do some stuff...
                if(readRecordsCount++ > 6)
                        break;
        }
        reader.Close();

hth,
Ian

-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Belcher
Sent: 23 June 2005 22:59
To: [email protected]
Subject: RE: [AspNetAnyQuestionIsOk] Relational Database Design Group

While objDataReader.Read()


I have code that ckecks if the record count is > than 6 and if so I want the
datareader to not read more records and move the pointer to the end so that
when it hits the end while statement it will think it has read all the
possible records and be done. Is there a command to do this?




 
Yahoo! Groups Links



 




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to