连接参数设置是只读的:改成(conn是一个连接)
dim rs as new ADODB.recordset
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