亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美sm极限捆绑bd| 26uuu久久天堂性欧美| 久久国产尿小便嘘嘘| 成人免费在线视频观看| 日韩一级视频免费观看在线| av一区二区三区| 青娱乐精品在线视频| 亚洲精品日产精品乱码不卡| 精品久久久网站| 欧美视频一区二区三区四区 | 国产麻豆成人精品| 亚洲国产美女搞黄色| 中文字幕第一区综合| 日韩欧美第一区| 欧美三级电影一区| 色视频一区二区| 成人aaaa免费全部观看| 激情欧美日韩一区二区| 午夜伦理一区二区| 亚洲另类在线制服丝袜| 中国色在线观看另类| 精品福利在线导航| 久久久久久久久久久久久夜| 日韩欧美中文字幕公布| 欧美精品在线视频| 欧美午夜电影在线播放| 色婷婷久久久亚洲一区二区三区| 丁香啪啪综合成人亚洲小说 | 91女神在线视频| 成人午夜激情片| 丁香网亚洲国际| 成人毛片老司机大片| 国产成人一级电影| 国产精品一区二区你懂的| 久久99国产精品免费网站| 美女脱光内衣内裤视频久久网站| 性做久久久久久免费观看| 一区二区三区影院| 亚洲天堂网中文字| 亚洲美腿欧美偷拍| 亚洲在线视频网站| 亚洲大片精品永久免费| 亚洲成av人片在线观看无码| 亚洲一区在线观看免费| 亚洲高清视频的网址| 日韩精品午夜视频| 丝袜美腿高跟呻吟高潮一区| 首页综合国产亚洲丝袜| 麻豆精品蜜桃视频网站| 久久99精品久久久久久国产越南| 日韩成人免费电影| 久久66热偷产精品| 国产精品中文有码| 99免费精品在线| 91丨九色porny丨蝌蚪| 色88888久久久久久影院按摩| 久久久久88色偷偷免费| 久久一夜天堂av一区二区三区| 久久综合视频网| 国产精品理伦片| 亚洲免费av网站| 午夜久久久久久久久| 免费不卡在线观看| 国产精品一区在线观看你懂的| 成人一区二区视频| 91福利视频久久久久| 欧洲日韩一区二区三区| 欧美一区国产二区| 国产日产欧美精品一区二区三区| 国产精品久久久久7777按摩| 亚洲综合激情网| 蜜臀久久99精品久久久久久9 | 亚洲综合免费观看高清完整版在线| 婷婷成人综合网| 国产在线精品一区二区夜色 | 国产成人免费视频网站| 91香蕉视频mp4| 51久久夜色精品国产麻豆| 久久亚洲欧美国产精品乐播| 亚洲日本免费电影| 日本美女一区二区三区视频| 成人亚洲精品久久久久软件| 欧美色精品在线视频| 久久综合色播五月| 亚洲综合免费观看高清完整版在线 | 国产精品亚洲一区二区三区在线 | 中文字幕国产一区| 五月天激情综合| 国产乱子轮精品视频| 91国偷自产一区二区使用方法| 欧美一级久久久久久久大片| 中文字幕在线一区| 粉嫩绯色av一区二区在线观看| 91丨九色丨黑人外教| 欧美电视剧在线看免费| 亚洲精品乱码久久久久| 国产一区三区三区| 欧美日韩高清在线播放| 久久夜色精品国产欧美乱极品| 亚洲精品伦理在线| 丁香激情综合国产| 日韩一区二区电影网| 亚洲日本电影在线| 国产精品一区二区果冻传媒| 在线播放中文字幕一区| 最新国产成人在线观看| 国产中文字幕精品| 欧美一区二区三区系列电影| 亚洲精品久久7777| 国产成人精品午夜视频免费| 91精品国产高清一区二区三区蜜臀| 亚洲色图制服丝袜| 国产成人免费视频网站 | 久久国内精品视频| 欧美裸体bbwbbwbbw| **性色生活片久久毛片| 国产成人av一区二区三区在线观看| 欧美日韩色综合| 亚洲色图视频网| 成人午夜在线视频| 久久久久99精品一区| 九九视频精品免费| 日韩欧美高清一区| 免费成人性网站| 日韩三级中文字幕| 免费视频一区二区| 538prom精品视频线放| 亚洲va在线va天堂| 欧美性xxxxxx少妇| 亚洲激情男女视频| 337p日本欧洲亚洲大胆精品| 视频一区视频二区在线观看| 欧美系列亚洲系列| 亚洲成av人片| 欧美一区二区三级| 麻豆视频一区二区| 精品电影一区二区三区| 激情综合网天天干| 久久综合色天天久久综合图片| 九色porny丨国产精品| 久久综合久久综合九色| 国产美女在线精品| 久久久久99精品一区| 国产1区2区3区精品美女| 国产无一区二区| 成人免费毛片高清视频| 国产精品久久久久久户外露出| 99re热这里只有精品免费视频| 国产精品美女久久久久高潮| 不卡在线视频中文字幕| 亚洲免费在线播放| 欧美精品aⅴ在线视频| 无吗不卡中文字幕| 欧美电影精品一区二区 | 欧洲激情一区二区| 亚洲国产视频在线| 欧美一级爆毛片| 丁香一区二区三区| 一区二区在线看| 日韩视频一区在线观看| 国产精品综合在线视频| 中文字幕中文字幕在线一区 | 免费成人深夜小野草| www日韩大片| 国产成人av电影免费在线观看| 国产精品国产自产拍在线| 在线视频一区二区三区| 日本女优在线视频一区二区| 欧美成人a∨高清免费观看| 福利一区在线观看| 国产一区二区毛片| 国产精品毛片久久久久久久| 91成人看片片| 久久精品国产亚洲高清剧情介绍| 久久精品在线观看| 在线观看日韩电影| 国产在线观看免费一区| 亚洲女人小视频在线观看| 91精品欧美一区二区三区综合在| 国内国产精品久久| 亚洲麻豆国产自偷在线| 日韩美女视频一区二区在线观看| 国产成人av一区二区| 午夜精品一区在线观看| 国产欧美在线观看一区| 欧美日韩一级二级三级| 国产91精品露脸国语对白| 午夜视频一区二区三区| 国产欧美日韩麻豆91| 欧美一区在线视频| 99精品热视频| 九九**精品视频免费播放| 一区二区在线看| 国产亚洲综合性久久久影院| 欧美精品丝袜中出| 91尤物视频在线观看| 国产精品中文欧美| 免费精品视频最新在线| 一区二区三区精品在线| 国产日产欧美精品一区二区三区|