Wrox Home  
Search P2P Archive for: Go

  Return to Index  

activex_data_objects thread: ADO 2.6


Message #1 by Joel Matubis <jhomatubis@y...> on Fri, 7 Mar 2003 16:48:30 -0800 (PST)
What type of provider supports index and seek? I think that finding a record is much faster than using
the find command...thanks.


---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more
Message #2 by "John "Skip" Bruscato" <skip@f...> on Tue, 11 Mar 2003 05:03:48
Microsoft's OLEDB Provider for Access does. (You might have to use a 
client-side cursor.)

Hands-down, indexed "seeks" are much faster than their sequential "find" 
counterparts. However, SQL Server uses indexes to perform seek-like 
lookups automatically when you specify an indexed column in a WHERE 
clause. If you think it can't figure out which index to use, you can tell 
it by adding the INDEX optimizer hint.

Skip
Message #3 by Joel Matubis <jhomatubis@y...> on Fri, 14 Mar 2003 17:36:32 -0800 (PST)
Hi! I've tried the OLD DB for Microsoft Access but still it doesn't work. I still can't use the index and seek methods i tried both
client and server cursortypes but still it won't work. What's wrong with it?  
Thanks.
jho 

objConn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database_name"



---------------------------------
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
Message #4 by "Enzo Zaragoza" <enzaux@g...> on Mon, 17 Mar 2003 08:28:39 +0800
	There was one microsoft article that I've read that I think that has something to do with your problem.  It says that ADO doesnt
supports "seek" (I'm not quite sure on this).  Try searching msdn online and try "DAO versus ADO" as search string.

-----Original Message-----
From: Joel Matubis [mailto:jhomatubis@y...]
Sent: Saturday, March 15, 2003 9:37 AM
To: ActiveX_Data_Objects
Subject: [activex_data_objects] Re: ADO 2.6



Hi! I've tried the OLD DB for Microsoft Access but still it doesn't work. I still can't use the index and seek methods i tried both
client and server cursortypes but still it won't work. What's wrong with it?
Thanks.
jho

objConn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database_name"



---------------------------------
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online




Message #5 by "John "Skip" Bruscato" <skip@f...> on Tue, 18 Mar 2003 01:30:26
A few things to remember to do to use Seek with the Access OLEDB provider:

- Open the recordset as adCmdTableDirect; if Seek is available, the 
resulting expression will return True:

  rs.Supports(adSeek)

- Set an Index (via the "Index") property before attempting to use Seek 
(in some cases, I had to set the Index before I opened the recordset)
- Pass your Seek keys as one parameter, a variant array; if you only have 
one parameter, then like this:
  
  rs.Seek Array(value)

Skip

P.S. Remember to have the ADO type library loading to use the ADO 
constants by name.

  Return to Index