CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Location
    India, TamilNadu, Chennai.
    Posts
    269

    Using ADO Seek & Index Method in SQL Server 2000

    Hi,

    Is it support SQL Server 2000 SEEK & INDEX Method of ADO, open with SQL Server OLE DB as provider?

    if it's possible send me sample pls.


    SEEK and INDEX both methods are working fine in OLEDB Jet 4.0 (Access 2000).


    Thanks & Regards,
    K.Babu
    Please avoid sending emails to my personal mail:
    write your doubts as thread in Codeguru
    Crystal Reports Forum
    .

    This will help all people having similar matters, and will let people who know solutions on the specific topic
    share their knowledge.

    Visit my company web site (Qmax Test Equipments Private Limited)

    Yours friendly,
    K.Babu

  2. #2
    Join Date
    Aug 2003
    Location
    London
    Posts
    515

    Re: Using ADO Seek & Index Method in SQL Server 2000

    No, you cannot use the Seek method with SQLOLEDB. SQL Server does not support this type of record access.

    Instead, use a SELECT statement against your table where you would have used the seek method.

    e.g.

    SELECT * FROM MyTable WHERE KeyField1 = KeyValue1 AND KeyField2 = KeyValue2

    If your table is indexed against these two fields, SQL Server interprets this and performs an Index Seek as part of the SQL Statement. Use the 'Show Execution Plan' tool from SQL Query Analyser to ensure your SQL statements are performing 'Index Seeks' rather than 'Index Scans'.

    This dbForums post gives additional info
    http://dbforums.com/t871964.html
    Last edited by Dmorley; November 19th, 2004 at 07:05 AM.

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

Featured