返回首页

gbase数据、南大通用产品文档:GBase8agbase_sqlstate

更新日期:2024年09月11日

 摘要:
返回由NULL 终结的字符串,该字符串包含关于上次错误的SQLSTATE 错误
代码。错误代码包含5 个字符。'00000'表示无错误。其值由ANSI SQL 和ODBC
指定
注意,
并非所有的GBase 错误均会被映射到SQLSTATE 错误代码。
值'HY000'
(一般错误)用于未映射的错误。
 语法:
const char *gbase_sqlstate(GBASE *gbase);
 参数:
 返回值:
包含SQLSTATE 错误码的、由NULL 终结的字符串。

SQLColumnPrivileges 返回指定表的列和相关权限的列表。
驱动程序将返回信息作为在指定
的 hstmt 上设置的结果。
下表描述了 SQLColumnPrivileges 的 SQLSTATE 和错误值。
SQLSTATE
错误值
错误消息
01000
-11001
General warning
08S01
-11020
Communication-link failure
24000
-11031
Invalid cursor state
S1000
-11060
General error
S1001
-11061
Memory-allocation failure
S1008
-11065
Operation canceled
S1010
-11067
Function-sequence error
S1090
-11071
Invalid string or buffer length
S1C00
-11092
Driver not capable
S1T00
-11094
Time-out expired
S1C00
-11300
SQL_DEFAULT_PARAM not supported
08S01
-11301
A protocol error has been detected. Current connection is
closed.
S1000
-11310
Create and Drop must be executed within a ServerOnly
Connection
S1000
-11320
Syntax error
S1000
-11323
The statement contained an escape clause not supported by
this database driver

分类
PL/SQL 块可以分为以下几类:

匿名块:动态构造,只能执行一次。语法请参考图17-2。

子程序:存储在数据库中的存储过程、函数、操作符和高级包等。当在数据库上建立好
后,可以在其他程序中调用它们。