sqlite3_open是C/C++里的函式。
基本介紹
- 中文名:sqlite3_open
- 定義:資料庫的api函式(C/C++)
- 函式原型:int sqlite3_open
- 參數說明:待打開(創建)的資料庫檔案名稱
- 返回值:Sqlite3函式調用返回值列表
介紹,函式原型,參數說明,返回值,說明,
介紹
sqlite3_open是sqlite資料庫的api函式(C/C++),作用是打開(或創建)一個資料庫檔案。
函式原型
int sqlite3_open(const char *filename, /* Database filename (UTF-8) */
sqlite3 **ppDb /* OUT: SQLite db handle */
);
參數說明
filename:待打開(創建)的資料庫檔案名稱
ppDb:sqlite3資料庫句柄的指針
返回值
Sqlite3函式調用返回值列表
#define SQLITE_OK 0 /* Successful result */
/* beginning-of-error-codes */
#define SQLITE_ERROR 1 /* SQL error or missing database */
#define SQLITE_INTERNAL 2 /* Internal logic error in 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()*/
#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */
#define SQLITE_CORRUPT 11 /* The database disk image is malformed */
#define SQLITE_NOTFOUND 12 /* Unknown opcode in sqlite3_file_control() */
#define SQLITE_FULL 13 /* Insertion failed because database is full */
#define SQLITE_CANTOPEN 14 /* Unable to open the database file */