I am using vb6 and trying to read an mdb file into a
Set rs = New ADODB.Recordset
rs.Open SqlStr, mvarDB
this my criteria string “id = ‘SA / -AS 0N’ And mp <>’N'”, there is a record in the table which id is the above mentioned and its mp column is not N. but when the
rs.MoveFirst
in watch window i can see the values of first column. but when below runs , the header says
rs.Filter = sCriteria
” : Value Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.> :”
Appreciate ur help.
ok the problem was 2 fold onedaywhen comment was helpful but the problem was,
1- the mdb file had worng datatype which was NUMBER so every null in the row caused the record to reach EOF. So i set datatype to TEXT.
2-TO FIND THE NULL IN THE RECORD SET I AM DOING A
Then i check this column if that is not null,
If found the null i use the ‘sCriteria = id = ‘NW’ else i use id = ‘NW’ And mp <>’N’.
is working great. The Null was causing the problem as pointed out.