GBase 8s ODBC Driver 程序员指南
南大通用数据技术股份有限公司
- 228 -
SQLGetData 返回当前行中单个未绑定列的结果数据。
应用程序在调用 SQLGetData 之前,
必须调用 SQLFetch 或 SQLExtendedFetch 和
(可选)
SQLSetPos 来定位一行数据的游标。对某些列可以使用 SQLBindCol,对相同行中的其它
列使用 SQLGetData。该函数可以用于从字符、二进制或数据源特定的数据类型(例如,来
自 SQL_LONGVARBINARY 或 SQL_LONGVARCHAR 列的数据)的列中检索字符或二
进制数据。
下表描述了 SQLGetData 的 SQLSTATE 和错误值。
SQLSTATE
错误值
错误消息
01000
-11001
General warning
01004
-11003
Data truncated
07006
-11013
Restricted data- type attribute violation
08S01
-11020
Communication-link failure
22002
-11024
Indicator value required but not supplied
22003
-11025
Numeric value out of range
22005
-11026
Error in assignment
22008
-11027
Datetime-field overflow
22012
-11028
Division by zero
24000
-11031
Invalid cursor state
S1000
-11060
General error
S1001
-11061
Memory-allocation failure
S1002
-11062
Invalid column number
S1003
-11063
Program type out of range
S1008
-11065
Operation canceled
S1009
-11066
Invalid argument value
S1010
-11067
Function-sequence error
S1090
-11071
Invalid string or buffer length
S1109
-11089
Invalid cursor position
S1C00
-11092
Driver not capable
S1T00
-11094
Time-out expired
08S01
-11301
A protocol error has been detected. Current connection is
closed.