Recordset.EOF What does it mean in vb6.0?

Recordset.EOF What does it mean in vb6.0?

Here i have taken Dataset in my applicatiion and i want to implement below given logic by using the dataset .Here any body give help to me it is very important.

If moRS.EOF Then

Me.Hide()

MsgBox("Unable to Access Password Information")

end if
[539 byte] By [Vsbabu] at [2008-1-6]
# 1

Hi

The EOF means "End Of File" and ADO (VB6) recordsets used them to allow you to determine if you were at the end of the recordset or not. For example, you may have opened a recordset and in order to determine if any records were returned you could do:

 If rs.BOF And rs.EOF Then
 MsgBox("No Records")
 End If

The above asks if the recordset is both at the beginning and end of the file, hence no records.

Now you mention a DataSet, so I am assuming that you are possibly converting VB6 code to VB.NET. If this is a wrong assumption then could you please clarify what you are attempting to do.

If you are using a DataSet and you want to determine if it contains any records then you can access the DataSet's table and check it's count property:

 If DataSet.Tables(0).Rows.Count = 0 Then
 MessageBox.Show("No Records")
 End If

HTH

DavidJeavons at 2007-10-2 > top of Msdn Tech,Visual Basic,Visual Basic Language...