i m trying to pick data randomly from the data base
but an error is getting generate the error is:
"either EOF or BOF is true or the current record has been deleted; the operation requested by the application requires a current record."
the record is available in th data base
de is the "data environment", "cid" is a variable having class id, "sid" is a variable having subject id from the tables.
plz c the code below 'n send me the answer.


While Not de.rscmd3.EOF
k = CInt(Rnd * 10)
de.rscmd3.Filter = "classid= " & cid & " And subjectid = " & sid & " And questionid = " & k
If de.rscmd3.EOF = True Then
de.rscmd3.MoveFirst
End If
paper.List1.AddItem "Q:" & x & ") " & de.rscmd3.Fields("question")
x = x + 1
If x = no Then
paper.Show
de.rscmd3.Close
Exit Sub
End If
Wend