if not DataRs.EOF Then>>>>>>>>>>>>此行可去掉!DataRs.MoveFirst If Not IsNull(DataRs!classified) Then
itemX.SubItems(1) = DataRs!classified
Else
itemX.SubItems(1) = ""
End If可改成:
If not isnull(datare!classified) then
itmx.subitems(1)=cstr(datars!classified)
end if
itemX.SubItems(1) = DataRs!classified
Else
itemX.SubItems(1) = ""
End If可改成:
If not isnull(datare!classified) then
itmx.subitems(1)=cstr(datars!classified)
end if
dim Mydb as database
……'打开数据库
if mydb.eof =true then
msgbox "EOF = True"'数据库结尾
else
msgbox "BOF = true"'数据库开头
end if这样你就会知道打开数据库的时候数据库指针其实是自动跳到最后的。