PRB: CPPOlapDemo: Olap.h File Not Included in Sample
ID: Q239845
|
The information in this article applies to:
-
Microsoft SQL Server OLAP Services version 7.0
BUG #: 663 (plato7x)
SYMPTOMS
The file, Olap.h, was not included with the CPPOlapDemo sample. So, while compiling you 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 in 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
//-------------------------------------------------------------------------
#ifndef OLAP_h // Protection from multiple #includes
#define OLAP_h
#include <windows.h> // Win32 API and definitions
#include <tchar.h> // Unicode support
#include <stddef.h> // offsetof
#include <assert.h> // 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\
//
#include "oledb.h" // OLE DB API
#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.
#define OLAP_strcmp(str1,len1,str2,len2) (CompareString(LOCALE_SYSTEM_DEFAULT,NORM_IGNORECASE|NORM_IGNOREKANATYPE|NORM_IGNOREWIDTH,str1,len1,str2,len2)-2)
// This macro allows you to get the length of the statically allocated
// arrays.
#ifndef NUMELEM
#define NUMELEM(p) (sizeof(p)/sizeof(*p))
#endif
#define PRINT_VB(format,type,data) { if (V_VT(data)&VT_BYREF ) \
_tprintf(format,m_pColumnLen[iColumn],*type##REF(data)); \
else
_tprintf(format,m_pColumnLen[iColumn],type##(data));}
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;
#include "OLAPTab.hpp"
#include "OLAPApp.hpp"
#endif
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.
Additional query words:
Keywords : kbOLAP700
Version : winnt:7.0
Platform : winnt
Issue type : kbprb