并非所有Recordsets都支持Index和Seek。你确定用适当的参数打开了Recordset吗?
按照Seek Method and Index Property Example (VB)的这个例子。确保使用相同的参数来打开Recordset。
rstEmployees.Open strSQLEmployees, strCnxn, adOpenKeyset, adLockReadOnly, adCmdTableDirect
然后使用此代码段查看是否支持Index和Seek:
' Does this provider support Seek and Index?
If rs1.Supports(adIndex) And rs1.Supports(adSeek) Then
MsgBox "Success: Seek and Index are Supported"
Else
MsgBox "Failure: Seek and Index are not Supported"
End If