
ADO Index property and Seek method
The following is a fragment of VB6 test code where I have been trying
to use the index and the Seek method of an ADO recordset.
So far I have been unable to get it to work. It always says it is not
implemented in the present interface.
Is it merely not implemented, as it says, or am I doing somethimng
wrong. According to the MSDN site it aught to work.
If anyone can help I would be most grateful
Geoff
Dim Cnn As New Connection
Dim sCnn As String
Dim Rs As New adodb.Recordset
Dim strSQLEmployees As String
Cnn.Provider = "Microsoft.Jet.OLEDB.4.0"
sdb = "C:\Temp\TestData.Mdb"
sCnn = "Data Source=" & sdb & ";" & _
"Jet OLEDB:Database Password=letmein"
Cnn.CursorLocation = adUseServer
Cnn.Mode = adModeReadWrite
Cnn.Open sCnn
Rs.CursorLocation = adUseServer
strSQLEmployees = "test table"
Rs.Open strSQLEmployees, Cnn, adOpenKeyset, adLockReadOnly, _
adCmdTableDirect
If Rs.Supports(adIndex) Then
Rs.Index = "long auto"
Rs.Seek 2
End If