Datatypes
The classes RWDBColumn and RWDBValue have an associated RWDBValue::ValueType that specifies the datatype of the database column or field being referenced. Mapping between this datatype and the database vendor type runs in both directions:
When fetching data or retrieving information about tables, the DB Access Module for Microsoft SQL Server converts the SQL type code provided by the Microsoft SQL Server ODBC driver into RWDBValue::ValueTypes. This mapping is shown in Table 208, which also gives the C++ datatype corresponding to the RWDBValue::ValueType.
When creating tables, the DB Access Module for Microsoft SQL Server maps the given RWDBValue::ValueType directly to the Microsoft SQL Server datatype. This mapping is shown in Table 209.
The RWDBValue::ValueTypes, accessible through the type() method, are uniform across all Access Modules. For a complete explanation of the DB Interface Module data model, see Chapter 7, "The Data Model," in the DB Interface Module User’s Guide, and RWDBValue in the SourcePro API Reference.
|
SQL Server Datatype |
ODBC SQL Datatype |
RWDBValue:: ValueType |
C++ Datatype |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RWDBValue:: ValueType |
SQL Server Datatype |
|
|
if 0 < |
|
|
|
|
|
|
|
|
|
|
|
Not supported by Microsoft SQL Server |
|
|
|
|
|
|
|
|
|
|
|
Not supported by Microsoft SQL Server |
|
|
|
|
|
|
|
|
if 0 < |
|
|
if 0 < |
|
|
|
In this section: