Query Demo Example
To initialize a data source, make a query, and release the command and data source, follow these steps:
-
Start QURYDEMO.EXE.
-
From the IDBInitialize menu, select Initialize.
-
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.
-
On the Command Text line, type the following query:
SELECT * FROM CUSTOMERS
-
From the Command menu, select Execute Command Text. Query Demo executes the command and returns the rowset.
-
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.