Input Mode
The following table lists the RDBMS API type-names that DB Link uses to send parameter values to the RDBMSs.
|
DB Link |
||||
|
IldByteType |
SQL_C_TINYINT |
CINTTYPE |
SQLINT1 |
SQL_C_TINYINT |
|
IldIntegerType |
SQL_C_LONG |
CINTTYPE |
SQLINT4 |
SQL_C_INTEGER |
|
IldRealType |
SQL_C_DOUBLE |
CDOUBLETYPE |
SQLFLT8 |
SQL_C_DOUBLE |
|
IldStringType |
SQL_C_CHAR |
CCHARTYPE |
SQLCHAR |
SQL_C_CHAR |
|
IldDateType IldDateTimeType |
SQL_C_CHAR |
CCHARTYPE |
SQLDATETIME |
SQL_C_CHAR |
|
IldMoneyType |
SQL_C_DOUBLE |
CDOUBLETYPE |
SQLMONEY |
SQL_C_DOUBLE |
|
IldLongTextType |
SQL_C_CHAR |
CLOCATOR |
SQLTEXT |
SQL_C_CHAR |
|
IldBinaryType |
SQL_C_BINARY |
CLOCATOR |
SQLBIT |
SQL_C_BINARY |
|
IldObjectType |
- |
CROWTYPE |
- |
- |
|
IldCollectionType |
- |
CCOLLTYPE |
- |
- |
|
IldCursorType |
- |
- |
- |
- |
|
IldRefType |
- |
- |
- |
- |
|
IldCLOBType |
SQL_CLOB_LOCATOR |
CLOCATOR |
- |
- |
|
IldBLOBType |
SQL_BLOB_LOCATOR |
CLOCATOR |
- |
- |
|
DB Link (Continued) |
||
|
SQLT_INT |
CS_INT |
|
|
SQLT_INT |
CS_INT |
|
|
SQLT_FLT |
CS_FLOAT |
|
|
SQLT_STR |
CS_CHAR |
|
|
SQLT_STR |
CS_CHAR |
|
|
SQLT_FLT |
CS_FLOAT |
|
|
SQLT_STR |
CS_CHAR |
|
|
SQLT_LBI |
CS_BINARY |
|
|
SQLT_NTY |
- |
|
|
SQLT_NTY |
- |
|
|
SQLT_RSET |
- |
|
|
SQLT_REF |
- |
|
|
SQLT_CLOB |
- |
|
|
SQLT_BLOB |
- |
The following special features of the Input Mode are described separately:
Date As String
When the date as string feature is turned off, the DB Link IldDateTime type values are sent using different database client API type symbols.
|
SQL_C_TYPE_TIMESTAMP |
|
|
CDTIMETYPE |
|
|
SQL_C_TIMESTAMP |
|
|
SQL_TIMESTAMP |
|
|
CS_DATETIME_TYPE |
Numeric As String
A similar change happens when the numeric as string feature is turned on:
|
SQL_C_NUMERIC |
|
|
CCHARTYPE |
|
|
SQL_C_CHAR |
|
|
SQLT_STR |
|
|
CS_NUMERIC |
MS SQL Server Limitation
MS SQL Server does not automatically convert string values into integer values; the application must use the SQL function convert:
cout << "Data insertion : " << endl;
const char* insertStr =
((!strncmp(dbms->getName(), "oracle", 6)
|| !strcmp(dbms->getName(), "sqlbase")) ?
"insert into ATABLE values(:1, :2)"
: ((!strcmp(dbms->getName(), "mssql") ||
!IldStrNICaseCmp(dbOdbc, "Microsoft SQL Server", 20)) ?
"insert into ATABLE values (convert(numeric(28, 9), ?), ?)"
: "insert into ATABLE values(?, ?)"));






