Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  4. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  5. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  6. // PARTICULAR PURPOSE.
  7. //
  8. // Copyright (c) 1999 Microsoft Corporation. All Rights Reserved.
  9. //
  10. // Sample Name: VBQuery - Sample Visual Basic Query Application
  11. //
  12. //--------------------------------------------------------------------------
  13. Description
  14. ===========
  15. The VBQuery sample is an example Windows application written in Visual
  16. Basic that illustrates how to query Indexing Service using the Indexing
  17. Service Query Language and the ADO and Query Helper APIs.
  18. Path
  19. ====
  20. Source: mssdk\samples\winbase\indexing\VBQuery\
  21. User's Guide
  22. ============
  23. * To build the sample
  24. 1. In the Visual Basic development environment, open the
  25. VBQuery.vbp project in the source path of the sample.
  26. 2. In the File menu, select Make VBQuery.exe.
  27. 3. In the Make Project dialog box, click OK.
  28. * To execute queries using the sample
  29. 1. Make sure that Indexing Service is started.
  30. 2. In the Query text box, enter the query text.
  31. 3. In the Scope text box, enter the folder where you want to start
  32. the search. You can click the button with "..." to display a
  33. dialog box to find a folder for the search Scope.
  34. 4. In the Sort list box, select the way you want the application to
  35. sort the search hits.
  36. 5. In the list box next to the Sort list, select the Indexing Service
  37. Query Language used to specify the query.
  38. 6. Click Go to run the specified query or Clear to specify a new
  39. query.
  40. Programming Notes
  41. =================
  42. The VBQuery sample illustrates how you can use the Query and Util
  43. Automation objects of the Query Helper API to build applications
  44. that query a catalog. The sample can process queries specified in any
  45. of the three query languages:
  46. * Query Language Dialect 1
  47. * Query Language Dialect 2
  48. * Structured Query Language (SQL)
  49. In addtion, the sample uses ADO objects to handle the recordsets returned
  50. by the Query Helper Automation objects.
  51. This sample also demonstrates making a DLL call to the LocateCatalogs
  52. function of the OLE DB Help API. The application uses this function to
  53. locate catalogs suitable for the scope specified by the user.