Results 1 to 3 of 3

Thread: Seeking

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Location
    Posts
    8

    Question

    Hi
    I am having difficulties using SEEK statement on a recordset.
    I use Jet OLEDB ver 4.0. with Access 2000.
    The message says the provider does not support this.
    How can I get around this? sample codes are welcomed.
    thanks
    Rezania
    Rezania

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Why do you need to SEEK? Do you just want to return all the recordset items?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    the FIND method is easier to use...why exactly do you need to use SEEK?

    Find method:
    Code:
        Dim cn As New ADODB.Connection
        Dim rs As New ADODB.Recordset
        
        cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=nwind2k.mdb"
        
        rs.CursorLocation = adUseClient
        rs.Open "Select * from Customers", cn, adOpenStatic, adLockReadOnly, adCmdText
        
        rs.Find "[CustomerID] = 'ALFKI'"
        
        If rs.EOF Then
            MsgBox "Not Found!"
        Else
            MsgBox "Found!"
        End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width