Indexes in ADO


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Indexes in ADO

  1. #1
    Sok Guest

    Indexes in ADO

    I have several routines that searches for a certain record.
    In DAO, I used .SEEK method with Jet driver.
    When I converted to ADO, I could no longer use .SEEK. So, I am using .FIND.

    Is it true that in ADO with Jet 4.0, I cannot use .SEEK?

    I am cercerned about a performance of using .FIND.

    If .SEEK is allowed, does anyone have a sample code of using indexes, .SEEK
    with ADO and Jet 4.0?

    tx.

    Sok



  2. #2
    Arthur Wood Guest

    Re: Indexes in ADO


    "Sok" <controlx@kornet.net> wrote:
    >I have several routines that searches for a certain record.
    >In DAO, I used .SEEK method with Jet driver.
    >When I converted to ADO, I could no longer use .SEEK. So, I am using .FIND.
    >
    >Is it true that in ADO with Jet 4.0, I cannot use .SEEK?
    >
    >I am cercerned about a performance of using .FIND.
    >
    >If .SEEK is allowed, does anyone have a sample code of using indexes, .SEEK
    >with ADO and Jet 4.0?
    >
    >tx.


    Yes, you shouold be able to use SEEK for ANY ADO recordset, but ONLY for
    a TABLE-type recordset.

    From the ADO Help file:

    "Use the Seek method in conjunction with the Index property if the underlying
    provider supports indexes on the Recordset object. Determine whether the
    underlying provider supports indexes with the Supports (adIndex) method.

    If Seek does not find the desired row, no error occurs, and the row is positioned
    at EOF. Set the Index property to the desired index before executing this
    method.

    This method can only be used when the Recordset object's CursorLocation property
    has a value other than adUseClient.
    "

    The last condition is probably the thing that is stopping you.

    Arthur Wood
    >
    >Sok
    >
    >



  3. #3
    Igor Guest

    Re: Indexes in ADO


    "Sok" <controlx@kornet.net> wrote:
    >I have several routines that searches for a certain record.
    >In DAO, I used .SEEK method with Jet driver.
    >When I converted to ADO, I could no longer use .SEEK. So, I am using .FIND.
    >
    >Is it true that in ADO with Jet 4.0, I cannot use .SEEK?
    >
    >I am cercerned about a performance of using .FIND.
    >
    >If .SEEK is allowed, does anyone have a sample code of using indexes, .SEEK
    >with ADO and Jet 4.0?
    >
    >tx.
    >
    >Sok
    >
    >



  4. #4
    Igor Guest

    Re: Indexes in ADO


    "Sok" <controlx@kornet.net> wrote:
    >I have several routines that searches for a certain record.
    >In DAO, I used .SEEK method with Jet driver.
    >When I converted to ADO, I could no longer use .SEEK. So, I am using .FIND.
    >
    >Is it true that in ADO with Jet 4.0, I cannot use .SEEK?
    >
    >I am cercerned about a performance of using .FIND.
    >
    >If .SEEK is allowed, does anyone have a sample code of using indexes, .SEEK
    >with ADO and Jet 4.0?
    >
    >tx.
    >
    >Sok
    >
    >

    Hey Sok,
    I had the same problem few month ago and posted similar message to this newsgroup.
    The only response I've got that you cannot use SEEK in Access 97 and SQL
    Server-- you can only use it with Access 2000. I do not know it for a fact
    'cause I did not use it Access 2000, but I could not make it work with Access
    97.
    Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center