Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7845009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:04:53+00:00 2026-06-02T17:04:53+00:00

I got a chance to work in the migration project(VB to VB.NET).I was confusing

  • 0

I got a chance to work in the migration project(VB to VB.NET).I was confusing in the RecordSet functionality.In our project we are taking the DataReader according to the scenario.But in the Looping cases like dsr.EOF.

  Dim recordset As dao.RecordSet
If recordset .EOF Then
       '    '    msgbox "Please enter some number ", vbOKOnly, "Number Not Found"
       '    '    txtAdd.SetFocus
       '    '    Exit Sub
End If

How to convert this into VB.NET?
Either we need to write If Not reader.Read or If reader.Read.

Can any help me regarding this ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T17:04:56+00:00Added an answer on June 2, 2026 at 5:04 pm

    I think what you might be after is the following

    Dim reader As IDataReader
    ' <fill the reader with your query via an IDbCommand>
    Dim dataFound As Boolean = false
    
    Using reader = command.ExecuteQuery()
        While reader.Read()
            ' <perform your data processing here>
            dataFound = True
        End While
    
        If dataFound = False Then
            ' <Here you do your processing for the case where data was not found.>
        End If
    End Using
    

    Or if you are only after one row of data, then we have:

    Dim reader As IDataReader
    ' <fill the reader with your query via an IDbCommand>
    
    Using reader = command.ExecuteQuery()
        If reader.Read() Then
            ' <perform your data processing here>
        Else
            ' <Here you do your processing for the case where data was not found.>
        End While
    End Using
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to get this to work but it's got me stumped. I
Is there anyone who got a chance to work on both? I need to
I got my datepicker to work exactly how I wanted it but now I
Can't work this out... I've got a .change event handler for multiple select boxes.
I have seen the ideas of domain models in UML, but I never got
I just got a project in Borland JBuilder 2006 that I cannot even build.
I've got a medium scale project (a turn-based game) that's currently written in C/C++.
I've tried the typical physics equations for this but none of them really work
I have a website using ASP.NET MVC, everything was working fine, but I'd like
So I've got a bit of an issue I'm trying to work through. Perhaps

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.