首批通过分布式安全可靠测评,为关键业务系统打造
OceanBase Connector/ODBC 错误码
更新时间:2026-04-09 15:10:59
OceanBase Connector/ODBC 返回的错误代码与 MySQL Connector/ODBC 相兼容。
下表展示了 OceanBase Connector/ODBC 返回的错误代码以及对应的服务器报错信息。
| 错误代码 | SQLSTATE 2 | SQLSTATE 3 | 报错信息 | 含义 |
|---|---|---|---|---|
| 500 | 01000 | 01000 | General warning | 一般告警 |
| 501 | 01004 | 01004 | String data, right truncated | 右截断字符串数据 |
| 502 | 01S02 | 01S02 | Option value changed | 选项值已更改 |
| 503 | 01S03 | 01S03 | No rows updated/deleted | 没有更新/删除行 |
| 504 | 01S04 | 01S04 | More than one row updated/deleted | 更新/删除了多行 |
| 505 | 01S06 | 01S06 | Attempt to fetch before the result set returned the first row set | 在结果集返回第一个行集之前尝试获取 |
| 506 | 07001 | 07002 | SQLBindParameter not used for all parameters | SQLBindParameter 未用于所有参数 |
| 507 | 07005 | 07005 | Prepared statement not a cursor-specification | Prepared Statement 未指定游标 |
| 508 | 07009 | 07009 | Invalid descriptor index | 无效的描述符号索引 |
| 509 | 08002 | 08002 | Connection name in use | 正在使用的连接名称 |
| 510 | 08003 | 08003 | Connection does not exist | 连接不存在 |
| 511 | 24000 | 24000 | Invalid cursor state | 无效的游标状态 |
| 512 | 25000 | 25000 | Invalid transaction state | 无效的事务状态 |
| 513 | 25S01 | 25S01 | Transaction state unknown | 事务状态未知 |
| 514 | 34000 | 34000 | Invalid cursor name | 无效的游标名称 |
| 515 | S1000 | HY000 | General driver defined error | 一般的驱动程序定义错误 |
| 516 | S1001 | HY001 | Memory allocation error | 内存分配错误 |
| 517 | S1002 | HY002 | Invalid column number | 无效的列号 |
| 518 | S1003 | HY003 | Invalid application buffer type | 无效的应用程序缓冲区类型 |
| 519 | S1004 | HY004 | Invalid SQL data type | 无效的 SQL 数据类型 |
| 520 | S1009 | HY009 | Invalid use of null pointer | null 指针使用无效 |
| 521 | S1010 | HY010 | Function sequence error | 函数序列错误 |
| 522 | S1011 | HY011 | Attribute can not be set now | 现在无法设置属性 |
| 523 | S1012 | HY012 | Invalid transaction operation code | 无效的事务操作码 |
| 524 | S1013 | HY013 | Memory management error | 内存管理错误 |
| 525 | S1015 | HY015 | No cursor name available | 没有可用的游标名称 |
| 526 | S1024 | HY024 | Invalid attribute value | 无效的属性值 |
| 527 | S1090 | HY090 | Invalid string or buffer length | 无效的字符串或缓冲区长度 |
| 528 | S1091 | HY091 | Invalid descriptor field identifier | 无效的描述字段标识符 |
| 529 | S1092 | HY092 | Invalid attribute/option identifier | 无效的属性/选项标识符 |
| 530 | S1093 | HY093 | Invalid parameter number | 无效的参数编号 |
| 531 | S1095 | HY095 | Function type out of range | 函数类型超出范围 |
| 532 | S1106 | HY106 | Fetch type out of range | 获取类型超出范围 |
| 533 | S1117 | HY117 | Row value out of range | 行值超出范围 |
| 534 | S1109 | HY109 | Invalid cursor position | 游标位置无效 |
| 535 | S1C00 | HYC00 | Optional feature not implemented | 可选功能未实现 |
| 0 | 21S01 | 21S01 | Column count does not match value count | 列数与值的数量不匹配 |
| 0 | 23000 | 23000 | Integrity constraint violation | 违反完整性约束 |
| 0 | 42000 | 42000 | Syntax error or access violation | 语法错误或访问冲突 |
| 0 | 42S02 | 42S02 | Base table or view not found | 未找到基表或视图 |
| 0 | 42S12 | 42S12 | Index not found | 未找到索引 |
| 0 | 42S21 | 42S21 | Column already exists | 列已存在 |
| 0 | 42S22 | 42S22 | Column not found | 找不到该列 |
| 0 | 08S01 | 08S01 | Communication link failure | 通信链路故障 |