亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? c_interface.tcl

?? 新版輕量級嵌入式數據庫
?? TCL
?? 第 1 頁 / 共 3 頁
字號:
## Run this Tcl script to generate the sqlite.html file.#set rcsid {$Id: c_interface.tcl,v 1.43 2004/11/19 11:59:24 danielk1977 Exp $}source common.tclheader {The C language interface to the SQLite library}puts {<h2>The C language interface to the SQLite library</h2><p>The SQLite library is designed to be very easy to use froma C or C++ program.  This document gives an overview of the C/C++programming interface.</p><h3>1.0 The Core API</h3><p>The interface to the SQLite library consists of three core functions,one opaque data structure, and some constants used as return values.The core interface is as follows:</p><blockquote><pre>typedef struct sqlite sqlite;#define SQLITE_OK           0   /* Successful result */sqlite *sqlite_open(const char *dbname, int mode, char **errmsg);void sqlite_close(sqlite *db);int sqlite_exec(  sqlite *db,  char *sql,  int (*xCallback)(void*,int,char**,char**),  void *pArg,  char **errmsg);</pre></blockquote><p>The above is all you really need to know in order to use SQLitein your C or C++ programs.  There are other interface functionsavailable (and described below) but we will begin by describingthe core functions shown above.</p><a name="sqlite_open"><h4>1.1 Opening a database</h4><p>Use the <b>sqlite_open</b> function to open an existing SQLitedatabase or to create a new SQLite database.  The first argumentis the database name.  The second argument is intended to signalwhether the database is going to be used for reading and writingor just for reading.  But in the current implementation, thesecond argument to <b>sqlite_open</b> is ignored.The third argument is a pointer to a string pointer.If the third argument is not NULL and an error occurswhile trying to open the database, then an error message will bewritten to memory obtained from malloc() and *errmsg will be madeto point to this error message.  The calling function is responsiblefor freeing the memory when it has finished with it.</p><p>The name of an SQLite database is the name of a file that willcontain the database.  If the file does not exist, SQLite attemptsto create and initialize it.  If the file is read-only (due topermission bits or because it is located on read-only media likea CD-ROM) then SQLite opens the database for reading only.  Theentire SQL database is stored in a single file on the disk.  Butadditional temporary files may be created during the execution ofan SQL command in order to store the database rollback journal ortemporary and intermediate results of a query.</p><p>The return value of the <b>sqlite_open</b> function is apointer to an opaque <b>sqlite</b> structure.  This pointer willbe the first argument to all subsequent SQLite function calls thatdeal with the same database.  NULL is returned if the open failsfor any reason.</p><a name="sqlite_close"><h4>1.2 Closing the database</h4><p>To close an SQLite database, call the <b>sqlite_close</b>function passing it the sqlite structure pointer that was obtainedfrom a prior call to <b>sqlite_open</b>.If a transaction is active when the database is closed, the transactionis rolled back.</p><a name="sqlite_exec"><h4>1.3 Executing SQL statements</h4><p>The <b>sqlite_exec</b> function is used to process SQL statementsand queries.  This function requires 5 parameters as follows:</p><ol><li><p>A pointer to the sqlite structure obtained from a prior call       to <b>sqlite_open</b>.</p></li><li><p>A null-terminated string containing the text of one or more       SQL statements and/or queries to be processed.</p></li><li><p>A pointer to a callback function which is invoked once for each       row in the result of a query.  This argument may be NULL, in which       case no callbacks will ever be invoked.</p></li><li><p>A pointer that is forwarded to become the first argument       to the callback function.</p></li><li><p>A pointer to an error string.  Error messages are written to space       obtained from malloc() and the error string is made to point to       the malloced space.  The calling function is responsible for freeing       this space when it has finished with it.       This argument may be NULL, in which case error messages are not       reported back to the calling function.</p></li></ol><p>The callback function is used to receive the results of a query.  Aprototype for the callback function is as follows:</p><blockquote><pre>int Callback(void *pArg, int argc, char **argv, char **columnNames){  return 0;}</pre></blockquote><a name="callback_row_data"><p>The first argument to the callback is just a copy of the fourth argumentto <b>sqlite_exec</b>  This parameter can be used to pass arbitraryinformation through to the callback function from client code.The second argument is the number of columns in the query result.The third argument is an array of pointers to strings where each stringis a single column of the result for that record.  Note that thecallback function reports a NULL value in the database as a NULL pointer,which is very different from an empty string.  If the i-th parameteris an empty string, we will get:</p><blockquote><pre>argv[i][0] == 0</pre></blockquote><p>But if the i-th parameter is NULL we will get:</p><blockquote><pre>argv[i] == 0</pre></blockquote><p>The names of the columns are contained in first <i>argc</i>entries of the fourth argument.If the <a href="pragma.html#pragma_show_datatypes">SHOW_DATATYPES</a> pragmais on (it is off by default) thenthe second <i>argc</i> entries in the 4th argument are the datatypesfor the corresponding columns.</p><p>If the <a href="pragma.html#pragma_empty_result_callbacks">EMPTY_RESULT_CALLBACKS</a> pragma is set to ON and the result ofa query is an empty set, then the callback is invoked once with thethird parameter (argv) set to 0.  In other words<blockquote><pre>argv == 0</pre></blockquote>The second parameter (argc)and the fourth parameter (columnNames) are still validand can be used to determine the number and names of the resultcolumns if there had been a result.The default behavior is not to invoke the callback at all if theresult set is empty.</p><a name="callback_returns_nonzero"><p>The callback function should normally return 0.  If the callbackfunction returns non-zero, the query is immediately aborted and <b>sqlite_exec</b> will return SQLITE_ABORT.</p><h4>1.4 Error Codes</h4><p>The <b>sqlite_exec</b> function normally returns SQLITE_OK.  Butif something goes wrong it can return a different value to indicatethe type of error.  Here is a complete list of the return codes:</p><blockquote><pre>#define SQLITE_OK           0   /* Successful result */#define SQLITE_ERROR        1   /* SQL error or missing database */#define SQLITE_INTERNAL     2   /* An 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 sqlite_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   /* (Internal Only) Table or record not found */#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   /* (Internal Only) Database table is empty */#define SQLITE_SCHEMA      17   /* The database schema changed */#define SQLITE_TOOBIG      18   /* Too much data for one row of a table */#define SQLITE_CONSTRAINT  19   /* Abort due to contraint violation */#define SQLITE_MISMATCH    20   /* Data type mismatch */#define SQLITE_MISUSE      21   /* Library used incorrectly */#define SQLITE_NOLFS       22   /* Uses OS features not supported on host */#define SQLITE_AUTH        23   /* Authorization denied */#define SQLITE_ROW         100  /* sqlite_step() has another row ready */#define SQLITE_DONE        101  /* sqlite_step() has finished executing */</pre></blockquote><p>The meanings of these various return values are as follows:</p><blockquote><dl><dt>SQLITE_OK</dt><dd><p>This value is returned if everything worked and there were no errors.</p></dd><dt>SQLITE_INTERNAL</dt><dd><p>This value indicates that an internal consistency check withinthe SQLite library failed.  This can only happen if there is a bug inthe SQLite library.  If you ever get an SQLITE_INTERNAL reply froman <b>sqlite_exec</b> call, please report the problem on the SQLitemailing list.</p></dd><dt>SQLITE_ERROR</dt><dd><p>This return value indicates that there was an error in the SQLthat was passed into the <b>sqlite_exec</b>.</p></dd><dt>SQLITE_PERM</dt><dd><p>This return value says that the access permissions on the databasefile are such that the file cannot be opened.</p></dd><dt>SQLITE_ABORT</dt><dd><p>This value is returned if the callback function returns non-zero.</p></dd><dt>SQLITE_BUSY</dt><dd><p>This return code indicates that another program or thread hasthe database locked.  SQLite allows two or more threads to read thedatabase at the same time, but only one thread can have the databaseopen for writing at the same time.  Locking in SQLite is on theentire database.</p></p></dd><dt>SQLITE_LOCKED</dt><dd><p>This return code is similar to SQLITE_BUSY in that it indicatesthat the database is locked.  But the source of the lock is a recursivecall to <b>sqlite_exec</b>.  This return can only occur if you attemptto invoke sqlite_exec from within a callback routine of a queryfrom a prior invocation of sqlite_exec.  Recursive calls tosqlite_exec are allowed as long as they donot attempt to write the same table.</p></dd><dt>SQLITE_NOMEM</dt><dd><p>This value is returned if a call to <b>malloc</b> fails.</p></dd><dt>SQLITE_READONLY</dt><dd><p>This return code indicates that an attempt was made to write toa database file that is opened for reading only.</p></dd><dt>SQLITE_INTERRUPT</dt><dd><p>This value is returned if a call to <b>sqlite_interrupt</b>interrupts a database operation in progress.</p></dd><dt>SQLITE_IOERR</dt><dd><p>This value is returned if the operating system informs SQLitethat it is unable to perform some disk I/O operation.  This could meanthat there is no more space left on the disk.</p></dd><dt>SQLITE_CORRUPT</dt><dd><p>This value is returned if SQLite detects that the database it isworking on has become corrupted.  Corruption might occur due to a rogueprocess writing to the database file or it might happen due to an perviously undetected logic error in of SQLite. This value is alsoreturned if a disk I/O error occurs in such a way that SQLite is forcedto leave the database file in a corrupted state.  The latter should onlyhappen due to a hardware or operating system malfunction.</p></dd><dt>SQLITE_FULL</dt><dd><p>This value is returned if an insertion failed because there isno space left on the disk, or the database is too big to hold anymore information.  The latter case should only occur for databasesthat are larger than 2GB in size.</p></dd><dt>SQLITE_CANTOPEN</dt><dd><p>This value is returned if the database file could not be openedfor some reason.</p></dd><dt>SQLITE_PROTOCOL</dt><dd><p>This value is returned if some other process is messing withfile locks and has violated the file locking protocol that SQLite useson its rollback journal files.</p></dd><dt>SQLITE_SCHEMA</dt><dd><p>When the database first opened, SQLite reads the database schemainto memory and uses that schema to parse new SQL statements.  If anotherprocess changes the schema, the command currently being processed willabort because the virtual machine code generated assumed the oldschema.  This is the return code for such cases.  Retrying thecommand usually will clear the problem.</p></dd><dt>SQLITE_TOOBIG</dt><dd><p>SQLite will not store more than about 1 megabyte of data in a singlerow of a single table.  If you attempt to store more than 1 megabytein a single row, this is the return code you get.</p></dd><dt>SQLITE_CONSTRAINT</dt><dd><p>This constant is returned if the SQL statement would have violateda database constraint.</p></dd><dt>SQLITE_MISMATCH</dt><dd><p>This error occurs when there is an attempt to insert non-integerdata into a column labeled INTEGER PRIMARY KEY.  For most columns, SQLiteignores the data type and allows any kind of data to be stored.  Butan INTEGER PRIMARY KEY column is only allowed to store integer data.</p></dd><dt>SQLITE_MISUSE</dt><dd><p>This error might occur if one or more of the SQLite API routinesis used incorrectly.  Examples of incorrect usage include calling<b>sqlite_exec</b> after the database has been closed using<b>sqlite_close</b> or calling <b>sqlite_exec</b> with the samedatabase pointer simultaneously from two separate threads.</p></dd><dt>SQLITE_NOLFS</dt><dd><p>This error means that you have attempts to create or access a filedatabase file that is larger that 2GB on a legacy Unix machine thatlacks large file support.</p></dd><dt>SQLITE_AUTH</dt><dd><p>This error indicates that the authorizer callbackhas disallowed the SQL you are attempting to execute.</p></dd><dt>SQLITE_ROW</dt><dd><p>This is one of the return codes from the<b>sqlite_step</b> routine which is part of the non-callback API.It indicates that another row of result data is available.</p></dd><dt>SQLITE_DONE</dt><dd><p>This is one of the return codes from the<b>sqlite_step</b> routine which is part of the non-callback API.It indicates that the SQL statement has been completely executed andthe <b>sqlite_finalize</b> routine is ready to be called.</p></dd></dl></blockquote><h3>2.0 Accessing Data Without Using A Callback Function</h3><p>The <b>sqlite_exec</b> routine described above used to be the onlyway to retrieve data from an SQLite database.  But many programmers foundit inconvenient to use a callback function to obtain results.  So beginningwith SQLite version 2.7.7, a second access interface is available thatdoes not use callbacks.</p><p>The new interface uses three separate functions to replace the single<b>sqlite_exec</b> function.</p><blockquote><pre>typedef struct sqlite_vm sqlite_vm;int sqlite_compile(  sqlite *db,              /* The open database */  const char *zSql,        /* SQL statement to be compiled */  const char **pzTail,     /* OUT: uncompiled tail of zSql */  sqlite_vm **ppVm,        /* OUT: the virtual machine to execute zSql */  char **pzErrmsg          /* OUT: Error message. */);int sqlite_step(  sqlite_vm *pVm,          /* The virtual machine to execute */  int *pN,                 /* OUT: Number of columns in result */  const char ***pazValue,  /* OUT: Column data */  const char ***pazColName /* OUT: Column names and datatypes */);int sqlite_finalize(  sqlite_vm *pVm,          /* The virtual machine to be finalized */  char **pzErrMsg          /* OUT: Error message */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
调教+趴+乳夹+国产+精品| 欧美成人性战久久| 1024精品合集| 色悠悠久久综合| 亚洲综合一二区| 欧美一区三区四区| 精品亚洲porn| 欧美激情资源网| 97se亚洲国产综合在线| 亚洲国产aⅴ成人精品无吗| 69av一区二区三区| 国产98色在线|日韩| 亚洲在线视频免费观看| 精品美女在线播放| 91小视频免费看| 性欧美大战久久久久久久久| 日韩欧美电影在线| 成人开心网精品视频| 一卡二卡三卡日韩欧美| 欧美顶级少妇做爰| 成人免费毛片aaaaa**| 亚洲小说欧美激情另类| 久久精品一区二区三区四区| 色国产综合视频| 韩国一区二区三区| 亚洲人成亚洲人成在线观看图片| 欧美亚一区二区| 国产乱子轮精品视频| 尤物视频一区二区| 2020日本不卡一区二区视频| 99vv1com这只有精品| 免费xxxx性欧美18vr| 亚洲视频每日更新| 日韩欧美国产小视频| 一本大道av伊人久久综合| 美洲天堂一区二卡三卡四卡视频| 国产精品久久777777| 日韩欧美国产一区在线观看| 91麻豆精品秘密| 国内久久精品视频| 天堂一区二区在线免费观看| 国产欧美精品在线观看| 欧美一级黄色录像| 91国产福利在线| av高清久久久| 国产福利一区二区三区在线视频| 亚洲一区二区成人在线观看| 欧美激情综合五月色丁香小说| 777久久久精品| 91久久精品一区二区三| 高清视频一区二区| 久久精品国产亚洲高清剧情介绍| 亚洲丝袜自拍清纯另类| 国产性天天综合网| 欧美精品一区二区在线播放| 欧美高清一级片在线| 色菇凉天天综合网| 99久久精品国产麻豆演员表| 国产精品一区二区三区四区| 日本aⅴ精品一区二区三区| 亚洲一区二区三区激情| 亚洲三级久久久| 国产精品久久国产精麻豆99网站| 国产亚洲精品7777| 久久麻豆一区二区| 26uuu精品一区二区| 日韩免费视频一区| 日韩一区二区三区视频| 日韩一级二级三级精品视频| 欧美精品aⅴ在线视频| 欧美日韩在线播| 欧美美女黄视频| 7777女厕盗摄久久久| 69久久99精品久久久久婷婷 | 一本大道久久a久久综合婷婷| 国产成人三级在线观看| 久久国产三级精品| 九九热在线视频观看这里只有精品| 日韩主播视频在线| 日本亚洲一区二区| 久久99国产精品久久| 国精品**一区二区三区在线蜜桃| 久久精品99国产精品| 韩国成人精品a∨在线观看| 国产一区二区三区免费观看| 国产福利电影一区二区三区| 国产宾馆实践打屁股91| 成人av动漫网站| 色8久久人人97超碰香蕉987| 欧美色国产精品| 欧美一区二区三区视频在线| 欧美精品一区二区三区四区 | 色94色欧美sute亚洲线路二| 欧美色综合天天久久综合精品| 欧美性xxxxx极品少妇| 欧美精品乱码久久久久久| 日韩一级视频免费观看在线| 亚洲精品一区二区三区四区高清| 国产清纯在线一区二区www| 中文字幕日韩欧美一区二区三区| 亚洲精品大片www| 喷水一区二区三区| 国产传媒久久文化传媒| www.视频一区| 7777精品伊人久久久大香线蕉经典版下载| 日韩一区二区三区免费观看| 国产视频不卡一区| 亚洲一区二区在线免费观看视频| 日本vs亚洲vs韩国一区三区二区| 国产福利电影一区二区三区| 色老头久久综合| 精品剧情v国产在线观看在线| 国产精品午夜电影| 偷窥少妇高潮呻吟av久久免费| 久久91精品久久久久久秒播| 99r精品视频| 欧美va亚洲va| 亚洲午夜视频在线观看| 国产一区二区三区久久悠悠色av | 色婷婷综合五月| 日韩欧美激情四射| 亚洲男人的天堂网| 成人一区二区三区| 91国产成人在线| 欧美成人精品二区三区99精品| 国产日韩欧美不卡在线| 久久久久久久久伊人| 久久美女高清视频| 6080午夜不卡| 久久久影院官网| 亚洲人成在线播放网站岛国| 亚洲一卡二卡三卡四卡无卡久久 | 777精品伊人久久久久大香线蕉| 欧美疯狂做受xxxx富婆| 日韩精品一区二区三区在线 | 日韩免费一区二区| 国产区在线观看成人精品| 亚洲精品免费在线播放| 亚洲va中文字幕| 韩国成人精品a∨在线观看| 成人sese在线| 91一区二区三区在线播放| 91麻豆产精品久久久久久 | 亚洲图片自拍偷拍| 美美哒免费高清在线观看视频一区二区 | 久久亚洲精品国产精品紫薇| 国产欧美日韩三区| 视频一区国产视频| 成人午夜视频免费看| 欧美精品一二三| 国产精品美女久久久久av爽李琼| 午夜电影久久久| av亚洲精华国产精华精华| 正在播放亚洲一区| 国产精品嫩草影院com| 日韩二区三区在线观看| 不卡av在线免费观看| 91精品国产综合久久婷婷香蕉| 日本一二三四高清不卡| 日韩电影在线看| 成人av午夜影院| 欧美成人伊人久久综合网| 亚洲欧美经典视频| 国产高清成人在线| 日韩欧美国产小视频| 亚洲综合激情网| av资源站一区| 久久九九99视频| 免费在线观看日韩欧美| 91成人在线免费观看| 国产日韩三级在线| 美女视频网站黄色亚洲| 欧美日韩专区在线| 日韩伦理免费电影| 丁香六月久久综合狠狠色| 精品久久久网站| 欧美aaaaaa午夜精品| 欧美亚洲日本一区| 亚洲视频一区二区在线| 成人综合婷婷国产精品久久免费| 欧美一区二区三区在线观看| 亚洲一区二区五区| 一道本成人在线| 国产精品嫩草影院av蜜臀| 国产伦精品一区二区三区在线观看| 日韩一区二区三区观看| 视频一区二区中文字幕| 在线亚洲一区二区| 亚洲欧美色图小说| 91婷婷韩国欧美一区二区| 国产女人18毛片水真多成人如厕| 久久se精品一区二区| 欧美一区二区日韩一区二区| 日韩精品一区第一页| 777xxx欧美| 精品一区二区国语对白| 精品动漫一区二区三区在线观看| 九色综合国产一区二区三区| 精品久久久久久久久久久久久久久久久 | 一区二区三区在线观看网站|