当前位置:网站首页>Jincang database kingbasees client Programming Interface Guide - ODBC feature support constraints
Jincang database kingbasees client Programming Interface Guide - ODBC feature support constraints
2022-07-28 23:49:00 【Thousands of sails passed by the side of the sunken boat_】
3. ODBC Features support constraints
KingbaseES Yes ODBC 3.0 The support of is constrained , This section will describe these constraints in terms of system boundary values .
3.1. System boundary value
System features | minimum value | Maximum |
|---|---|---|
ODBC Number of connections per environment handle | 0 | 128 |
3.2. Special data description
BLOB
BLOB Data types can be inserted programmatically ( reference example Medium " Binding parameters are BLOB value " ), You can also call SQL sentence
insert into [table name] values(1,X'41424344')Insert .CLOB
And BLOB similar ,CLOB Data types can be inserted programmatically , You can also call SQL sentence
insert into [table name] values(1, 'ABCD')Insert .
3.3. Other constraints
SQLBindCol
The types in specific columns can be converted to C data type , See table 3.3.1.
SQLBindParameter
Support from the C The data type goes to SQL Transformation of data types , See table 3.3.2.
The column type is the same as SQL For the corresponding relationship of statement types, see table 3.3.3.
SQLGetData
The types in specific columns can be converted to C data type , See table 3.3.1.
Refer to the following detailed data type conversion :
The column types in the table are up to C Conversion of data types
The column types in the table are up to SQL Mapping of data types
3.3.1. The column types in the table are up to C Conversion of data types
call SQLBindCol and SQLGetData You can refer to this table .
The column definitions in the table can be those listed in the first column of the following table 12 Types ,ODBC Of C The data types can be those listed in the first row of the following table 20 Types .
If the table is defined as a type on the left , So when you call SQLGetData perhaps SQLBindCol when TargeType Parameters can only be filled in the row corresponding to the data type "Y" Of C data type .
for example , When the column in the table is defined as date, So called SQLGetData perhaps SQLBindCol when ,TargetType The parameter can be SQL_C_DEFAULT,SQL_C_CHAR,SQL_C_DATE,SQL_C_TIME,SQL_C_TIMESTAMP, And can't be SQL_C_TINYINT.
Column definitions in the table | C data type | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
S Q L _C _ DE FA UL T | S Q L _C _ CH AR | S Q L _C _ TI NY IN T | S Q L _C _ UT IN YI NT | S Q L _C _ ST IN YI NT | S Q L _C _ SH OR T | S Q L _C _ US HO RT | S Q L _C _ SS HO RT | S Q L _C _ LO NG | S Q L _C _ UL ON G | S Q L _C _ SL ON G | S Q L _C _ SB IG IN T | S Q L _C _ UB IG IN T | S Q L _C _ DO UB LE | S Q L _C _ FL OA T | S Q L _C _ BI NA RY | S Q L _C _ BI T | S Q L _C _ DA TE | S Q L _C _ TI ME | S Q L _C _ TI ME ST AM P | |
BIGINT | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | |||||
INTEGER | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | |||||
SMALLINT | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | |||||
TINYINT | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | |||||
NUMERIC DECIMAL | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | |||||
FLOAT DOUBLE REAL | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | |||||
BIT | Y | Y | ||||||||||||||||||
BYTEA BLOB | Y | Y | ||||||||||||||||||
BOOL BOOLEAN | Y | Y | ||||||||||||||||||
DATE TIME TIMESTAMP INTERVAL | Y | Y | Y | Y | Y | |||||||||||||||
CHAR VARCHAR | Y | Y | Y | Y | Y | |||||||||||||||
TEXT CLOB | Y | Y | ||||||||||||||||||
3.3.2. C Data type to SQL Conversion of data types
call SQLBindParameter You can refer to this table .
ODBC Of C The data type can use the 18 Types ,SQL Statement types can use the 19 Types .
If the binding parameter ValueType For some kind of C data type , So when you call SQLBindParameter when ,ParameterType The parameter can only be this C The column corresponding to the data type is filled with "Y" Of SQL data type . Such as :
If the binding parameter ValueType by SQL_C_CHAR, So called SQLBindParameter when ,ParameterType The parameter can be SQL_CHAR,SQL_VARCHAR,SQL_LONGVARCHAR, And can't be SQL_DECIMAL.
Column definitions in the table | C data type | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
S Q L _C _ DE FA UL T | S Q L _C _ CH AR | S Q L _C _ TI NY IN T | S Q L _C _ UT IN YI NT | S Q L _C _ ST IN YI NT | S Q L _C _ SH OR T | S Q L _C _ US HO RT | S Q L _C _ SS HO RT | S Q L _C _ LO NG | S Q L _C _ UL ON G | S Q L _C _ SL ON G | S Q L _C _ DO UB LE | S Q L _C _ FL OA T | S Q L _C _ BI NA RY | S Q L _C _ BI T | S Q L _C _ DA TE | S Q L _C _ TI ME | S Q L _C _ TI ME ST AM P | |
SQL_CHAR | Y | Y | Y | Y | Y | |||||||||||||
SQL_VARCHAR | Y | Y | Y | Y | Y | |||||||||||||
SQL_LONGVARCHAR | Y | Y | ||||||||||||||||
SQL_DECIMAL | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | ||||||
SQL_NUMERIC | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | ||||||
SQL_BIT | Y | Y | ||||||||||||||||
SQL_TINYINT | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | ||||||
SQL_SMALLINT | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | ||||||
SQL_INTEGER | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | |||||||
SQL_BIGINT | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | ||||||
SQL_REAL | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | ||||||
SQL_FLOAT | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | ||||||
SQL_DOUBLE | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | ||||||
SQL_BINARY | Y | Y | ||||||||||||||||
SQL_VARBINARY | Y | Y | ||||||||||||||||
SQL_LONGVARBINARY | Y | Y | ||||||||||||||||
SQL_TYPE_DATE | Y | Y | Y | Y | ||||||||||||||
SQL_TYPE_TIME | Y | Y | Y | Y | ||||||||||||||
SQL_TYPE_TIMESTAMP | Y | Y | Y | Y | ||||||||||||||
3.3.3. The column types in the table are up to SQL Mapping of data types
The following table lists the calls SQLBindParameter The columns in the time table define the data type and SQL Type correspondence :
When the data type in the table is defined as a type of the first column , So when you call SQLBindParameter when ,ParameterType It can only be the value of the second column in its corresponding row . Such as : The column type in the table is INTEGER(INT), So the corresponding SQL The data type can only be SQL_INTEGER, Not for others SQL data type , Otherwise, the data conversion will be wrong .
Column definitions in the table | It can be transformed into the following SQL data type |
|---|---|
BIGINT | SQL_BIGINT |
INTEGER | SQL_INTEGER |
SMALLINT | SQL_SMALLINT |
TINYINT | SQL_TINYINT |
DECIMAL NUMERIC | SQL_DECIMAL, SQL_NUMERIC |
REAL FLOAT DOUBLE | SQL_REAL, SQL_FLOAT, SQL_DOUBLE |
BYTEA | SQL_BINARY, SQL_VARBINARY |
BLOB | SQL_LONGVARBINARY |
BOOL BOOLEAN | SQL_BIT |
DATE TIME TIMESTAMP | SQL_DATE, SQL_TIME, SQL_TIMESTAMP |
CHAR VARCHAR TEXT | SQL_CHAR, SQL_VARCHAR |
CLOB | SQL_LONGVARCHAR |
边栏推荐
- A new generation of ultra safe cellular battery, Sihao aipao, will be available from 139900 yuan
- 【CNN】为什么CNN的卷积核大小一般都是奇数
- The classic dual stack implementation queue, pay attention to the modification of the judgment conditions of traversing the stack.
- Learn browser decoding from XSS payload
- 金仓数据库 KingbaseES 与 Oracle 的兼容性说明(3. 常用函数)
- Asynchronism and synchronization of visa write and read functions by LabVIEW
- AUTOCAD——Excel表格导入CAD、CAD合并两兄弟
- Trivy [2] tool vulnerability scanning
- 2022 R2 mobile pressure vessel filling test question simulation test platform operation
- 剑指 Offer 55 - I. 二叉树的深度
猜你喜欢

2022 welder (Junior) work license questions and answers

零视科技 H5S视频平台 GetUserInfo 信息泄漏漏洞 CNVD-2020-67113

MySQL introduction
![[self] - question brushing - peak value](/img/cf/9c47da9c574b61415578e7fde8b126.png)
[self] - question brushing - peak value

深度剖析集成学习GBDT

Solve thread safety problems & singleton mode

2022G3锅炉水处理考试模拟100题模拟考试平台操作

Rhce第一天

尿酸酶丨Worthington猪肝尿酸酶的特征:

1314_ Serial port technology_ Basic information of RS232 communication
随机推荐
How to add the index of a set in mongodb to another set in mongodb
2022 R2 mobile pressure vessel filling test question simulation test platform operation
2022 welder (Junior) work license questions and answers
KingbaseES客户端编程接口指南-ODBC(4. 创建数据源)
Intel data center GPU is officially shipped to provide strong computing power with openness and flexibility
Worthington丨Worthington胰蛋白酶抑制剂说明书
The computer doesn't know what to uninstall, can't open the calculator, can't edit screenshots, can't open txt files, and so on
深度剖析集成学习Adaboost
fastdfs工作原理(技术原理)
Zabbix 5.0 使用自带Redis模版监控
The classic dual stack implementation queue, pay attention to the modification of the judgment conditions of traversing the stack.
mongodb索引添加、查看、导出、删除
npm更换最新淘宝镜像
Compatibility description between kingbasees and Oracle (3. Common functions)
Deep analysis of integrated learning AdaBoost
Merkle tree
Classic topological sorting problem -- leetcode207 curriculum +leetcode210 curriculum II
Combination of smart TV and applet
field injection is not recommended 的解决办法
Codeforces Round #810 (Div. 2) A - C