title: How to use SQL indexes to seek a starting point
body: <p>In VB we used to be able to open an ACCESS DAO.Recordset and specify an index. Once opened, we could seek to a specific record in the index and then walk through the dataset backwards and forwards from there using the index.</p>
  
  <pre><code>Dim dnj As DAO.Recordset
  dnj = DB.OpenRecordset("ITEMS")
  dnj.Index = "IndexIW"
  dnj.Seek("=", "Item 17a", "ABC")
  dnj.MovePrevious()
  </code></pre>
  
  <p>Is there an equivalent in modern databases like SQL Server using Indexes to read through records? I tried this but the error says the API for indexes is not supported.</p>
  
  <pre><code>Dim iTbl As New ADODB.Recordset
  Dim key(1) As String
  iTbl.ActiveConnection = cnn
  iTbl.CursorLocation = ADOR.CursorLocationEnum.adUseServer
  iTbl.Open("ITEMS")
  iTbl.Index = "IndexIW"
  key(0) = "Item 17a"
  key(1) = "ABC"
  iTbl.Seek(key, ADODB.SeekEnum.adSeekFirstEQ)
  iTbl.MovePrevious()
  </code></pre>
  
  <p>What I would really like to be able to do is something like:</p>
  
  <pre><code>SELECT NEXT 10 ITEM_NUM, ITEM_TYPE, ITEM_DESC FROM ITEMS WHERE (PK_ITEM) = ("Item 17a","ABC")  
  </code></pre>
  
  <p>or</p>
  
  <pre><code>SELECT TOP 10 ITEM_NUM, ITEM_TYPE, ITEM_DESC FROM ITEM STARTING WITH PK_ITEM = ("Item 17a","ABC")  
  </code></pre>
  
  <p>But I don't know how to do that</p>