Data types for OLE DB provider

Conversion

When working with a consumer that supports OLE DB, the WinCC OA data types are converted into the listed types as follows:

WinCC OA data type OLE DB data types
struct -
bit32 DBTYPE_UI4
bool DBTYPE_BOOL
char DBTYPE_UI1
float DBTYPE_R8
int DBTYPE_I4
unsigned DBTYPE_I4
string DBTYPE_BSTR
langstring DBTYPE_BSTR (CONV.)
time DBTYPE_DATE
typeref -
dpid DBTYPE_BSTR
blob -
dyn_bool ARRAY |DBTYPE_BOOL
dyn_int ARRAY |DBTYPE_I4
dyn_uint ARRAY |DBTYPE_UI4
dyn_float ARRAY |DBTYPE_R8
dyn_string ARRAY |DBTYPE_BSTR
dyn_langString ARRAY |DBTYPE_BSTR (CONV:)
dyn_bit32 ARRAY |DBTYPE_UI4
dyn_char ARRAY |DBTYPE_UI1
dyn_time ARRAY |DBTYPE_DATE
dyn_dpid ARRAY |DBTYPE_BSTR
dyn_blob -
bool array ARRAY |DBTYPE_BOOL
int array ARRAY|DBTYPE_I4
uint array ARRAY|DBTYPE_UI4
float array ARRAY|DBTYPE_R8
string array ARRAY|DBTYPE_BSTR
langString array ARRAY|DBTYPE_BSTR
bit32 array ARRAY|DBTYPE_UI4
char array ARRAY|DBTYPE_UI1
time array ARRAY|DBTYPE_DATE
dpid array ARRAY|DBTYPE_BSTR
blob array -

The integer data types (except I2) do not work under Excel 97, that is, a runtime error is output for an OLE DB access using VBA. This is an Excel 97 specific problem.

Conversion of data types

If working with VB programs, the following conversion matrix applies when importing data into variables of a specific type:

From/To bit32 bool char float int unsigned string langString time
bit32 x - - - x x x - -
bool - x x x x x x - -
char - - x x x x x - -
float - x - x x x x - -
int x x - x x x x - x
unsigned x x - x x x x - x
string - x x x - - x - -
langString - - - - - - x x -
time - - - - x x x - x