Oracle 存储数值数据类型如下
NUMERIC:SQL_DECIMAL=3 大小 38,0
NUMERIC(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.