当前位置:网站首页>Jincang database kingbasees client programming interface guide ODBC (5. Development process)
Jincang database kingbasees client programming interface guide ODBC (5. Development process)
2022-07-28 23:48:00 【Thousands of sails passed by the side of the sunken boat_】
5. The development process
In the correct setting KingbaseES ODBC After the data source , Application usage KingbaseES ODBC API The steps are as follows :
call SQLAllocHandle Function allocation environment handle .
call SQLAllocHandle Function to allocate connection handle .
Use the allocated connection handle to call SQLConnect,SQLBrowseConnect perhaps SQLDriverConnect connect to a data source . It specifies the name of the data source and any additional information needed to complete the connection .
Process one or more SQL sentence :
The application will SQL Put the text string in the buffer .
If the statement includes parameter markers , Then set it to the parameter value .
If the statement returns a result set , The application program assigns the tag name to the statement or uses the default tag name of the driver . The application is “SQLPrepare or SQLExecute” Submit statement .
If the statement creates a result set , The application asks for the result set attribute , For example, the number of columns , And the name of a specific column 、 Type, etc . It allocates storage for each column in the result set and retrieves the results .
If the statement causes an error , The application program extracts the error information from the driver and takes corresponding actions .
End each transaction by committing or re operating .
When the interaction between the application and the data source ends , Terminate connection , Release the corresponding handle . The sequence of function execution is as follows :
SQLAllocHandle(SQL_HANDLE_ENV,NULL,&henv)<=> SQLAllocEnv ;
SQLAllocHandle(SQL_HANDLE_DBC,henv,&hdbc)<=> SQLAllocConnect ;
SQLConnect ;
SQLAllocHandle(SQL_HANDLE_STMT,hdbc,&hstmt)<=> SQLAllocStmt ;
Handle SQL sentence (SQLPrepare This step can be omitted, but it must be called SQLExecDirect);
If there are binding parameters, the binding assignment (SQLBindParameter);
Can pass SQLGetDescField, SQLColAttribute, SQLDescribeCol Wait for functions to get information ( It can be omitted );
adopt SQLExecute or SQLExecDirect Execute function ;
To get the results (SQLFetch, SQLBindCol, SQLGetData...);
SQLFreeHandle(SQL_HANDLE_STMT,hstmt)<=> SQLFreeStmt ;
SQLDisconnect ;
SQLFreeHandle(SQL_HANDLE_DBC,hdbc)<=> SQLFreeConnect ;
SQLFreeHandle(SQL_HANDLE_ENV,henv)<=> SQLFreeEnv ;
In order for users to better use KingbaseES ODBC Function access KingbaseES database , This document also gives some ODBC Operation example of , Please see the example .
边栏推荐
- 多传感器融合定位(二)——基于地图的定位
- 剑指 Offer 64. 求1+2+…+n,逻辑运算符短路效应
- Learn browser decoding from XSS payload
- Achieve high throughput through Wi Fi 7 - insight into the next generation of Wi Fi physical layer
- My second uncle is angry and swipes the screen all over the network. How can he cure my spiritual internal friction?
- 2022年G2电站锅炉司炉考试题库模拟考试平台操作
- Fundamental inquiry binary tree
- Codeforces Round #474 (Div. 1 + Div. 2) - C, F
- 剑指 Offer 41. 数据流中的中位数
- 齐博建站指南(艾戈勒)
猜你喜欢
![[self] - brush questions set](/img/de/46582086addbe5465d658081516f4c.png)
[self] - brush questions set

My second uncle is angry and swipes the screen all over the network. How can he cure my spiritual internal friction?

Byte 8 years' experience of female test Director - for girls who want to change careers or are about to enter the testing industry

Class, leetcode919 -- complete binary tree inserter

剑指 Offer 41. 数据流中的中位数

利用递归和链表头插法实现链表成组的翻转——LeetCode25 K个一组翻转链表

解决:Direct local .aar file dependencies are not supported when building an AAR.

Exchange 2013 SSL证书安装文档

MySQL transaction and storage system
![Trivy [2] tool vulnerability scanning](/img/7a/c1012c75b23076f5a9b09e5756adba.png)
Trivy [2] tool vulnerability scanning
随机推荐
Few people can really play in the "aftermarket" of the whole house intelligent fire collection
超参数优化(网格搜索和贝叶斯优化)
Rhce第一天
什么是驱动程序签名,驱动程序如何获取数字签名?
What is utxo?
【CNN】为什么CNN的卷积核大小一般都是奇数
xss.haozi.me靶场详解
简述分组密码的加密分组链接模式的工作原理及其特点(密码学移位密码加密解密)
MySQL log management, backup and recovery
[self] - question brushing - peak value
【详细超简单】如何使用WebSocket链接
苹果官网正在更新维护 Apple Store,国行 iPhone 13 / Pro 等产品将最高优惠 600 元
毕业三年之际写给可能迷茫的你我[转]
2022 R2 mobile pressure vessel filling test question simulation test platform operation
KingbaseES客户端编程接口指南-ODBC(4. 创建数据源)
多传感器融合定位(二)——基于地图的定位
尿酸酶丨Worthington猪肝尿酸酶的特征:
Compatibility description between kingbasees and Oracle (3. Common functions)
Samba service setup
台式机dp接口在哪(主机没有dp接口怎么办)