SQLite 返回值
1
2
3
4
5
6
7
8
9
10
11
|
/*
** CAPI3REF: Result Codes //返回码
** KEYWORDS: {result code definitions}
**
** Many SQLite functions return an integer result code from the set shown
** here in order to indicate success or failure.
**
** New error codes may be added in future versions of SQLite.
**
** See also: [extended result code definitions]
*/
|
#define SQLITE_OK 0 /* Successful result */ 成功
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
/* beginning-of-error-codes */
#define SQLITE_ERROR 1
/* SQL error or missing database */ SQL 语法错误 或 缺少数据库
#define SQLITE_INTERNAL 2
/* Internal logic error in SQLite */ SQLite 内部逻辑错误
#define SQLITE_PERM 3
/* Access permission denied */没有访问权限
#define SQLITE_ABORT 4
/* Callback routine requested an abort */回调函数请求终止
#define SQLITE_BUSY 5
/* The database file is locked */数据库文件被锁定
#define SQLITE_LOCKED 6
/* A table in the database is locked */数据库中的表被锁定
#define SQLITE_NOMEM 7
/* A malloc() failed */数据库调用函数失败
#define SQLITE_READONLY 8
/* Attempt to write a readonly database */视图对只读数据库文件进行写操作
#define SQLITE_INTERRUPT 9
/* Operation terminated by sqlite3_interrupt()*/操作被 sqlite3_interrupt() 终止
#define SQLITE_IOERR 10
/* Some kind of disk I/O error occurred */某些磁盘 I/O(输入输出)错误
#define SQLITE_CORRUPT 11
/* The database disk image is malformed */数据库磁盘文件损坏,视图打开非 SQLite 数据库也会出现这个错误
#define SQLITE_NOTFOUND 12
/* Unknown opcode in sqlite3_file_control() */未知的 pdcode 在 sqlite3_file_control() 中
#define SQLITE_FULL 13
/* Insertion failed because database is full */数据库已满,插入操作失败,文件系统没有足够空间或者数据库文件无法拓展
#define SQLITE_CANTOPEN 14
/* Unable to open the database file */无法打开数据库文件
#define SQLITE_PROTOCOL 15
/* Database lock protocol error */数据库已锁定或者协议错误
#define SQLITE_EMPTY 16
/* Database is empty */数据库为空
#define SQLITE_SCHEMA 17
/* The database schema changed */数据库模式改变
#define SQLITE_TOOBIG 18
/* String or BLOB exceeds size limit */字符串 或 BLOB 超出大小限制
#define SQLITE_CONSTRAINT 19
/* Abort due to constraint violation */违反约束操作被终止
#define SQLITE_MISMATCH 20
/* Data type mismatch */数据类型不匹配
#define SQLITE_MISUSE 21
/* Library used incorrectly */资源库使用不正确,当你的 API 程序使用不当时可能会产生此错误
#define SQLITE_NOLFS 22
/* Uses OS features not supported on host */使用了不被机器支持的 OS 功能,如果 SQLite 编译时启用了大文件支持,但是所在的操作系统不支持 LFS,会产生该错误
#define SQLITE_AUTH 23
/* Authorization denied */授权被否决
#define SQLITE_FORMAT 24
/* Auxiliary database format error */辅助性的数据库格式错误
#define SQLITE_RANGE 25
/* 2nd parameter to sqlite3_bind out of range */sqlite3_bind() 的第二个参数超出范围
#define SQLITE_NOTADB 26
/* File opened that is not a database file */打开的文件不是 SQLite 数据库文件
#define SQLITE_NOTICE 27
/* Notifications from sqlite3_log() */来自sqlite3_log()的通知
#define SQLITE_WARNING 28
/* Warnings from sqlite3_log() */来自sqlite3_log()的警告
#define SQLITE_ROW 100
/* sqlite3_step() has another row ready */sqlite3_step()的另一行数据已经准备就绪
#define SQLITE_DONE 101
/* sqlite3_step() has finished executing */sqlite3_step() 已经执行完毕
/* end-of-error-codes */
|