Query Demo Example

To initialize a data source, make a query, and release the command and data source, follow these steps:

  1. Start QURYDEMO.EXE.

  2. From the IDBInitialize menu, select Initialize.

  3. Choose MSDASQL as the provider, and type OLE_DB_NWind_Jet for the Name parameter and admin for the UserID. Leave the Password parameter blank. Click Initialize. A command window appears.

    Note   If you installed the OLE DB SDK in a directory other than the default directory, you will need to change the OLE_DB_NWind_Jet data source to use your directory.

  4. On the Command Text line, type the following query:
    SELECT * FROM CUSTOMERS
    
  5. From the Command menu, select Execute Command Text. Query Demo executes the command and returns the rowset.

  6. From the IDBInitialize menu, select Uninitialize. Click Release to close the connection to the data source. Releasing the data source also closes all open queries on that session.