How to use ADO and Windows Desktop Search with VBA

Posted on 2010-01-11
Medium Priority
Last Modified: 2013-11-27
I found this thread here with an example


I have put another example below.  This is not my code just an example.

Upon trying to open the connection I get "Provider Cannot be Found. It may not be properly Installed"

I would like to be able to run this from MS Access 2003.
Dim con As ADODB.Connection
Dim rst As ADODB.Recordset

Set con = New ADODB.Connection
Set rst = New ADODB.Recordset

Dim sConString As String
Dim sSQLString As String

sConString = "Provider=Search.CollatorDSO;Extended Properties='Application=Windows';"
con.Open sConString

sSQLString = "SELECT Top 5 System.ItemPathDisplay FROM SYSTEMINDEX"

Set rst = con.Execute(sSQLString)

Do Until (rst.EOF)
   Debug.Print rst.Fields.Item("System.ItemPathDisplay").Value

Set rst = Nothing

Set con = Nothing

Open in new window

Question by:darbid73
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 29

Accepted Solution

nffvrxqgrcfqvvc earned 2000 total points
ID: 26282814
If you use Windows XP you have to download Windows Search 4.0

I think this is part of the operating sytem if the user is running Vista SP1 or greater and I can confirm it's part of the operating system on Windows7.
LVL 20

Author Comment

ID: 26282903
Ahh its a version propblem.

I am on a work computer with admins somewhere pushing updates to us.  Our WDS is only  02.06.5000.5378.  Does ot surprise me that we have a version from 2006 - http://technet.microsoft.com/en-us/library/cc771683%28WS.10%29.aspx

I suppose that I cannot download the provider without getting the whole thing? Probably be not compatible anyway.

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month8 days, 10 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question