【转载】NativeSQL实例
2016-03-11 11:01
197 查看
转自:http://blog.sina.com.cn/s/blog_3f2c03e301017fqz.html
------------------------------------------------------------
在ABAP程序中除使用 EXEC SQL 执行NativeSQL外,还有一种动态使用Native sql的方法:ADBC API
实例程序:ADBC_DEMO
SAP提供的全局类有:
cl_sql_connection
cl_sql_statement
ADBC API 简介如下:
ADBC - ABAP Database Connectivity
ADBC is an API for the Native SQL interface of the AS ABAP that is based on ABAP Objects.
The methods of ADBC make it possible to;
send database specific SQL commands to a database system and process the result
to establish and administer database connections.
While the statements of Native SQL offer exclusively static access to the Native SQL interface, ADBC makes an object orientated and dynamic access possible.
The ADBC classes all begin with the prefix CL_SQL_ or CX_SQL_ and are documented. The following paragraphs briefly introduce the most important classes.
CL_SQL_STATEMENT - Execution of SQL Statements
CL_SQL_PREPARED_STATEMENT - Prepared SQL Statements
CL_SQL_CONNECTION - Administration of Database Connections
CX_SQL_EXCEPTION - Exception Class
Notes
Note ADBC can always be used when access to a database via the Native instead of the Open SQL interface is necessary and static access is not sufficient.
ADBC does not support automatic client handling. The client ID of a database table must be specified explicitly. Note that application programs should only use data from the current client. In Multitenancy systems, this is checked by the ABAP runtime environment.
Continue
CL_SQL_STATEMENT - Execution of SQL Statements
CL_SQL_STATEMENT - Prepared SQL Statements
CL_SQL_CONNECTION - Database Connections
CX_SQL_EXCEPTION - Exception Class
Examples of ADBC
http://help.sap.com/abapdocu_702/en/abenadbc.htm
------------------------------------------------------------
在ABAP程序中除使用 EXEC SQL 执行NativeSQL外,还有一种动态使用Native sql的方法:ADBC API
实例程序:ADBC_DEMO
SAP提供的全局类有:
cl_sql_connection
cl_sql_statement
ADBC API 简介如下:
ADBC - ABAP Database Connectivity
ADBC is an API for the Native SQL interface of the AS ABAP that is based on ABAP Objects.
The methods of ADBC make it possible to;
send database specific SQL commands to a database system and process the result
to establish and administer database connections.
While the statements of Native SQL offer exclusively static access to the Native SQL interface, ADBC makes an object orientated and dynamic access possible.
The ADBC classes all begin with the prefix CL_SQL_ or CX_SQL_ and are documented. The following paragraphs briefly introduce the most important classes.
CL_SQL_STATEMENT - Execution of SQL Statements
CL_SQL_PREPARED_STATEMENT - Prepared SQL Statements
CL_SQL_CONNECTION - Administration of Database Connections
CX_SQL_EXCEPTION - Exception Class
Notes
Note ADBC can always be used when access to a database via the Native instead of the Open SQL interface is necessary and static access is not sufficient.
ADBC does not support automatic client handling. The client ID of a database table must be specified explicitly. Note that application programs should only use data from the current client. In Multitenancy systems, this is checked by the ABAP runtime environment.
Continue
CL_SQL_STATEMENT - Execution of SQL Statements
CL_SQL_STATEMENT - Prepared SQL Statements
CL_SQL_CONNECTION - Database Connections
CX_SQL_EXCEPTION - Exception Class
Examples of ADBC
http://help.sap.com/abapdocu_702/en/abenadbc.htm
相关文章推荐
- 怎样删除数据库中重复的信息,只保留一条
- oracle索引导致的查询记录为0的案例
- Windows 下Redis的安装教程和PHP使用Redis示例
- ORACLE百例试炼五
- SQL优先排序
- MySQL 二进制日志(Binary Log)
- Oracle用户频繁被锁原因排查与解决
- SQLServer数据库安装教程(图文)
- 以windows Service的方式启动MongoDB
- python+mongodb==pymongo的源码安装
- ORACLE基础语句-建表
- 【转】jbdc程序启动报错:ORA-12505;PL/SQL却可以登录的解决方法
- mysql复制环境清理二进制日志
- not allowed to connect to this mysql server
- 从一个问题看MySQL的权限访问控制
- SQLite INJECTION/注入
- SQL中PIVOT 行列转换
- 删除mysql 安装 mysql 5.1.65 5.1.73
- SQL语句基本用法
- SQL语句