Analysis Services Programming Samples

Analysis Services Programming

Analysis Services Programming

Analysis Services Programming Samples

The following samples illustrate Microsoft® SQL Server™ 2000 Analysis Services application development in Microsoft Visual Basic® Scripting Edition (VBScript), Microsoft Visual C++®, and Visual Basic.

Each sample demonstrates a different technique for working with cube data. Prerequisites for viewing or running each sample vary depending on the development tool and methodology used to create the code.

Installing Sample Files

The sample applications are installed with the optional Samples component of Analysis Services. They are located in the Samples folder under Microsoft Analysis Services (installed by default to C:\Program Files\Microsoft Analysis Services\Samples). Each sample program is contained in a subfolder at this location.

General Requirements

Many samples require a SQL Server database that provides cube data. For testing purposes, you can use the cubes in the FoodMart 2000 database. You can modify sample source files to point to this database or to specific cubes.

Sample Scripts and Programs

The following table lists and describes the categories of samples you can work with. Sample source code has comments to help you learn how the application works.

Sample category Description
Simple Cube Creation A set of samples that demonstrate how to create cubes from client and server applications.
Cube Query and Result Set Manipulation A set of samples that demonstrate how to query a cube and manipulate the result set. Samples are provided for both client and server applications.
Cube Schema Retrieval and Manipulation A set of samples that demonstrate how to obtain cube schema data and manipulate the data. Samples are provided for both client and server applications.
Complex Cube Creation and Manipulation A three-part integrated sample that demonstrates how to create a cube, write-enable the cube, and write back to the cube.

In addition, a different sample shows how to retrieve cube data and schema information and then manipulate the results using dynamic HTML (DHTML).