Read issue in ASP.NET

Results 1 to 2 of 2

Thread: Read issue in ASP.NET

  1. #1
    Join Date
    Dec 1969

    Default Read issue in ASP.NET

    hi<BR><BR>when i use data reader and i am checking whether the data exist from the query or not. for this i am checking thru when i do this read moves the first record and displays from the second record. how to handle this. thanks in advance.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Read issue in ASP.NET

    Use the .HasRows property (this may only be available in .NET Framework version 1.1, I can&#039;t recall if it was in 1.0...)<BR><BR>Essentially, you can do:<BR>[code language="VB"]<BR>If reader.HasRows then<BR> &#039;There are rows...<BR>Else<BR> &#039;There are no records<BR>End If<BR>[/code]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts