MsgBox Rst1.RecordCount
While Not Rst1.EOF
MsgBox Rst1.Fields("departmentname")
Rst1.MoveNext
Wend为什么Rst1.RecordCount值为-1
而MsgBox Rst1.Fields("departmentname")能显示正确的值呢
While Not Rst1.EOF
MsgBox Rst1.Fields("departmentname")
Rst1.MoveNext
Wend为什么Rst1.RecordCount值为-1
而MsgBox Rst1.Fields("departmentname")能显示正确的值呢
rst1.movefitst
MsgBox Rst1.RecordCount
While Not Rst1.EOF
MsgBox Rst1.Fields("departmentname") & ""
Rst1.MoveNext
Wend
你可以对Rst1做有条件的查询,最好能使用关键索引字段