当前位置:网站首页>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 .
边栏推荐
- How to add the index of a set in mongodb to another set in mongodb
- 2022t elevator repair examination questions and simulation examination
- 简述分组密码的加密分组链接模式的工作原理及其特点(密码学移位密码加密解密)
- Codeforces Round #474 (Div. 1 + Div. 2) - C, F
- 酒店预订系统数据库房间库存设计思路
- 通配符 SSL/TLS 证书
- 金仓数据库 KingbaseES 与 Oracle 的兼容性说明(3. 常用函数)
- 猿人学第二十题
- 类中多函数填写,LeetCode919——完全二叉树插入器
- General paging - front desk
猜你喜欢

Plato Farm有望通过Elephant Swap,进一步向外拓展生态

使用Pytorch快速训练网络模型

什么是驱动程序签名,驱动程序如何获取数字签名?

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

Mongodb index add, view, export, delete

Deep analysis of integrated learning gbdt

PHP 海报二维码合成

Xss.haozi.me range details

Worthington丨Worthington胰蛋白酶抑制剂说明书

Pagoda phpMyAdmin unauthorized access vulnerability
随机推荐
How to open a profitable gym? I tell you from one year's experience that don't fall in love
深度剖析集成学习Xgboost
齐博建站指南(艾戈勒)
How powerful can top "hackers" be? Internet access without signal, expert: high-end operation!
Manufacturing steps of interactive slide screen in exhibition hall
Blocking queue
Worthington核糖核酸测定详细攻略
小程序editor富文本编辑使用及rich-text解析富文本
多传感器融合定位(二)——基于地图的定位
2022T电梯修理考试试题及模拟考试
毕业三年之际写给可能迷茫的你我[转]
Class, leetcode919 -- complete binary tree inserter
Worthington核糖核酸酶B历史和化学性质说明
General paging - front desk
1314_ Serial port technology_ Basic information of RS232 communication
控件 圆角描边 MaterialShapeDrawable
A new generation of ultra safe cellular battery, Sihao aipao, will be available from 139900 yuan
【CNN】为什么CNN的卷积核大小一般都是奇数
[self] - question brushing - peak value
剑指 Offer 64. 求1+2+…+n,逻辑运算符短路效应