Oracleは、数値データ型を次のように格納します
NUMERIC:SQL_DECIMAL =3サイズ38,0NUMERIC(10,0):SQL_DECIMAL = 3サイズ10、0
NUMERIC(19,0):SQL_DECIMAL = 3サイズ
19、0
最後の桁はスケールなので、例:-
NUMERIC(12,3):SQL_DECIMAL = 3サイズ12、3
Easysoftなどの商用ドライバーは、ODBCで必要なデータ型をサポートしています:-
Full Connect(Default)
Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3
Successfully connected to DSN 'ESOracle32'.
SQLGetTypeInfo:
In: StatementHandle = 0x00DD7C58, DataType = SQL_INTEGER=4
Return: SQL_SUCCESS=0
Get Data All:
"TYPE_NAME", "DATA_TYPE", "COLUMN_SIZE", "LITERAL_PREFIX", "LITERAL_SUFFIX", "CREATE_PARAMS", "NULLABLE", "CASE_SENSITIVE", "SEARCHABLE", "UNSIGNED_ATTRIBUTE", "FIXED_PREC_SCALE", "AUTO_UNIQUE_VALUE", "LOCAL_TYPE_NAME", "MINIMUM_SCALE", "MAXIMUM_SCALE", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "NUM_PREC_RADIX", "INTERVAL_PRECISION"
"INTEGER", 4, 9, <Null>, <Null>, <Null>, 1, 0, 3, 0, 0, 0, "NUMBER(9)", <Null>, <Null>, 6, <Null>, 10, <Null>
1 row fetched from 19 columns.
SQLGetTypeInfo:
In: StatementHandle = 0x00DD7C58, DataType = SQL_NUMERIC=2
Return: SQL_SUCCESS=0
Get Data All:
"TYPE_NAME", "DATA_TYPE", "COLUMN_SIZE", "LITERAL_PREFIX", "LITERAL_SUFFIX", "CREATE_PARAMS", "NULLABLE", "CASE_SENSITIVE", "SEARCHABLE", "UNSIGNED_ATTRIBUTE", "FIXED_PREC_SCALE", "AUTO_UNIQUE_VALUE", "LOCAL_TYPE_NAME", "MINIMUM_SCALE", "MAXIMUM_SCALE", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "NUM_PREC_RADIX", "INTERVAL_PRECISION"
"NUMBER", 2, 38, <Null>, <Null>, "precision,scale", 1, 0, 3, 0, 0, 0, "NUMBER", <Null>, <Null>, 2, <Null>, 10, <Null>
1 row fetched from 19 columns.