Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,


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.
VB
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 ?
Posted
Updated 26-Apr-12 0:03am
v2

1 solution

You can do something like:

VB
If Not reader.Read() Then
    ' do the processing
End If
 
Share this answer
 
Comments
Vipin_Arora 26-Apr-12 7:57am    
yes.. +5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900