Regarding BOF & EOF

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ktmarathe
    New Member
    • Sep 2006
    • 7

    Regarding BOF & EOF

    Dear friends

    i m using datareader, using this how can i check BOF & EOF (i means record is availablein db or not). and also say if i using repeater (in both databases SQL server2000 & MS Access2000)
    thanking you,

    Kishor
  • girish
    New Member
    • Sep 2006
    • 6

    #2
    Hi

    When ever you need to check the records in DataReader , Check it using

    Datareader.HasR ows , it will return true or false

    if you wanna read the records from datareader then
    you need to put in a loop

    Datareader.Read
    -STATEMENT 1
    -STATEMENT 2

    Comment

    • nmsreddi
      Contributor
      • Jul 2006
      • 366

      #3
      hello

      as you are using datareader then you can find the total no of fields in the database

      dr.fieldcount;//it gives the totalcount

      write the loop incrementing up to dr.fieldcount

      if control is out of loop just display EOF


      try it it works fine

      Comment

      Working...