|
-
November 19th, 2004, 06:11 AM
#1
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
-
November 19th, 2004, 06:56 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|