MDXSample

This generic OLE DB for OLAP client application, written in Visual Basic®, uses ADO MD to obtain schema information and query a multidimensional data source. The application consists of a query window to enter MDX queries and a schema window where schema information is presented in a tree view as well as a dataset grid where query data is displayed in a pivot table.

To connect to the sample OLAP provider:

  1. Start the MDX Sample application (MDXSampl.exe).

  2. In the initial connection dialog box, enter the name and path to the sample cube database (BobsVideo.cub) in the Server text box, and enter MSOLAP in the Provider text box.

To enter or edit a sample query:

  1. Use Open from the File menu to open the MDXQuery.mdx sample query file.

  2. Select a sample query from the Queries box on the toolbar.

MDXSamples.mdx is a text file which contains several MDX queries designed for the sample cube database file, BobsVideo.cub. New queries can be entered and saved as well.

Fully commented Visual Basic source code for the MDX Sample Application can be viewed by opening the MDXSampl.vbp project file in Visual Basic. The frmMain.frm or Main.frm file contains sample code. A search on "ADO" provides specific information and comments on how ADO MD is used by this application. These commented code examples are useful for creating a new MDX querying application.