With conn
If .State = adStateOpen Then
.Close
End If
.CursorLocation = adUseClient
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & strSQL
.Open
End With
With rs
.Open "Select * from Authors;", conn, adOpenStatic, adLockOptimistic
If .BOF And .EOF Then
msgbox "没有任何记录"
Exit Sub
End If
.MoveFirst
.movelast
msgbox "有" & .recordcount & "条记录!"
End With