Microsoft KB Archive/239845

= BUG: CPPOlapDemo: Olap.h File Not Included in Sample =

Article ID: 239845

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server OLAP Services

-



This article was previously published under Q239845



BUG #: 663 (plato7x)



SYMPTOMS
The file, Olap.h, was not included with the CPPOlapDemo sample. So, while compiling you may encounter an error similar to the following:

Compiling... OLAPApp.cpp C:\Program Files\OLAP Services\Shippedsamples\CppOlapDemo\OLAPApp.cpp(11) :

fatal error C1083: Cannot open include file: 'OLAP.h': No such file or directory

Error executing cl.exe.

OLAPApp.obj - 1 error(s), 0 warning(s)



WORKAROUND
The file, Olap.h, is included in entirety in this article. You can copy and paste this file to the CPPOlapDemo sample folder. Note that this file also includes the files msmd.h and oledb.h. The locations of these files are specified in the comments of the Olap.h file. //- // Microsoft(R) OLE DB OLAPDEMO Sample // Copyright (C) 1995-1998 Microsoft Corporation // // File: OLAP.h // // This file serves as precompiled header for the project. // It #includes all necessary files and #defines commonly used macros // and constants //-


 * 1) ifndef OLAP_h                 // Protection from multiple #includes
 * 2) define OLAP_h


 * 1) include            // Win32 API and definitions
 * 2) include              // Unicode support
 * 3) include       // offsetof
 * 4) include             // assert

// oledb.h is provided in the Microsoft Data Access Components and Data // Access SDK available at www.microsoft.com/data, and installed by // default to: // C:\MSDASDK\include\oledb\ // // msmd.h is provided with Microsoft SQL Server(TM) OLAP Services and is // installed by default to C:\Program Files\OLAP Services\Samples\Include\ //


 * 1) include "oledb.h"             // OLE DB API
 * 2) include "msmd.h"              // Microsoft's implementation of OLE DB for OLAP

// This macro is used for string comparisons that compare strings based on // the locale. // It works correctly for Japanese when Hiragana and Katakana characters // are used.

(CompareString(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE|NORM_IGNOREKANATYPE|NORM_IGNOREWIDTH, str1,len1,str2,len2)-2)
 * 1) define OLAP_strcmp(str1,len1,str2,len2)

// This macro allows you to get the length of the statically allocated // arrays.


 * 1) ifndef NUMELEM
 * 2) define NUMELEM(p) (sizeof(p)/sizeof(*p))
 * 3) endif

_tprintf(format,m_pColumnLen[iColumn],*type##REF(data)); \ else _tprintf(format,m_pColumnLen[iColumn],type##(data));}
 * 1) define PRINT_VB(format,type,data) { if (V_VT(data)&VT_BYREF )  \

const DWORD OLAP_APP_MAX_STRING_LEN  = 10000;

const DWORD OLAP_APP_MAX_COLUMN_STR  = 128; const DWORD OLAP_APP_MIN_COLUMN_STR  = 16; const DWORD OLAP_APP_MIN_COLUMN_VAL  = 4;

const DWORD OLAP_ALL                 = 0xFFFFFFFF;

const DWORD OLAP_APP_MAX_BINDINGS    = 128; const DWORD OLAP_APP_MAX_COLUMNS     = 128;

const DWORD NUMROWS_CHUNK            = 100;


 * 1) include "OLAPTab.hpp"
 * 2) include "OLAPApp.hpp"


 * 1) endif



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
Olap.h ships on the CD in the demo directory under a file named CDSamples.exe. CDSamples.exe is a self extracting file that contains a number of sample programs. One of the subdirectories is named CppOlapDemo. CppOlapDemo contains a C++ sample that includes the Olap.h file.

Keywords: kbbug kbfix KB239845

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.