The SQLOLEDB driver does not support SEEK. I suppose that's because the assumption is that you'll let the server do what the server does so well -- limit the data returned to you.
>Is it possible to use Index property and Seek Method? with below codes? ( I use ADO 2.6)
>
>
>Dim cnADOIO as ADODB.Connection
>Dim rsTest as ADODB.Recordset
>Set cnADOIO = New ADODB.Connection
>set rsTest = New ADODB.RecordSet
>
>cnADOIO.ConnectionString = "Provider=sqloledb;Data Source=NTServer1;Initial Catalog=IO;User Id=ITDept;Password=1234"
>cnADOIO.ConnectionTimeout = 30
>cnADOIO.Open
>
>rsTest.CursorLocation = adUseServer
>rsTest.Index = "PrimaryKey"
>rsTest.Open "Staff", cnADOIO, adOpenKeyset, adLockReadOnly, adCmdTableDirect
>
>Thanks for any information and or suggestion
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell