Debian Codegraph @

www/rescode.html

raw
1 <!DOCTYPE html>
2 <html><head>
3 <meta name="viewport" content="width=device-width, initial-scale=1.0">
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
5 <link href="sqlite.css" rel="stylesheet">
6 <title>Result and Error Codes</title>
7 <!-- path= -->
8 </head>
9 <body>
10 <div class=nosearch>
11 <a href="index.html">
12 <img class="logo" src="images/sqlite370_banner.gif" alt="SQLite" border="0">
13 </a>
14 <div><!-- IE hack to prevent disappearing logo --></div>
15 <div class="tagline desktoponly">
16 Small. Fast. Reliable.<br>Choose any three.
17 </div>
18 <div class="menu mainmenu">
19 <ul>
20 <li><a href="index.html">Home</a>
21 <li class='mobileonly'><a href="javascript:void(0)" onclick='toggle_div("submenu")'>Menu</a>
22 <li class='wideonly'><a href='about.html'>About</a>
23 <li class='desktoponly'><a href="docs.html">Documentation</a>
24 <li class='desktoponly'><a href="download.html">Download</a>
25 <li class='wideonly'><a href='copyright.html'>License</a>
26 <li class='desktoponly'><a href="support.html">Support</a>
27 <li class='desktoponly'><a href="prosupport.html">Purchase</a>
28 <li class='search' id='search_menubutton'>
29 <a href="javascript:void(0)" onclick='toggle_search()'>Search</a>
30 </ul>
31 </div>
32 <div class="menu submenu" id="submenu">
33 <ul>
34 <li><a href='about.html'>About</a>
35 <li><a href='docs.html'>Documentation</a>
36 <li><a href='download.html'>Download</a>
37 <li><a href='support.html'>Support</a>
38 <li><a href='prosupport.html'>Purchase</a>
39 </ul>
40 </div>
41 <div class="searchmenu" id="searchmenu">
42 <form method="GET" action="search">
43 <select name="s" id="searchtype">
44 <option value="d">Search Documentation</option>
45 <option value="c">Search Changelog</option>
46 </select>
47 <input type="text" name="q" id="searchbox" value="">
48 <input type="submit" value="Go">
49 </form>
50 </div>
51 </div>
52 <script>
53 function toggle_div(nm) {
54 var w = document.getElementById(nm);
55 if( w.style.display=="block" ){
56 w.style.display = "none";
57 }else{
58 w.style.display = "block";
59 }
60 }
61 function toggle_search() {
62 var w = document.getElementById("searchmenu");
63 if( w.style.display=="block" ){
64 w.style.display = "none";
65 } else {
66 w.style.display = "block";
67 setTimeout(function(){
68 document.getElementById("searchbox").focus()
69 }, 30);
70 }
71 }
72 function div_off(nm){document.getElementById(nm).style.display="none";}
73 window.onbeforeunload = function(e){div_off("submenu");}
74 /* Disable the Search feature if we are not operating from CGI, since */
75 /* Search is accomplished using CGI and will not work without it. */
76 if( !location.origin || !location.origin.match || !location.origin.match(/http/) ){
77 document.getElementById("search_menubutton").style.display = "none";
78 }
79 /* Used by the Hide/Show button beside syntax diagrams, to toggle the */
80 function hideorshow(btn,obj){
81 var x = document.getElementById(obj);
82 var b = document.getElementById(btn);
83 if( x.style.display!='none' ){
84 x.style.display = 'none';
85 b.innerHTML='show';
86 }else{
87 x.style.display = '';
88 b.innerHTML='hide';
89 }
90 return false;
91 }
92 var antiRobot = 0;
93 function antiRobotGo(){
94 if( antiRobot!=3 ) return;
95 antiRobot = 7;
96 var j = document.getElementById("mtimelink");
97 if(j && j.hasAttribute("data-href")) j.href=j.getAttribute("data-href");
98 }
99 function antiRobotDefense(){
100 document.body.onmousedown=function(){
101 antiRobot |= 2;
102 antiRobotGo();
103 document.body.onmousedown=null;
104 }
105 document.body.onmousemove=function(){
106 antiRobot |= 2;
107 antiRobotGo();
108 document.body.onmousemove=null;
109 }
110 setTimeout(function(){
111 antiRobot |= 1;
112 antiRobotGo();
113 }, 100)
114 antiRobotGo();
115 }
116 antiRobotDefense();
117 </script>
118 <div class=fancy>
119 <div class=nosearch>
120 <div class="fancy_title">
121 Result and Error Codes
122 </div>
123 <div class="fancy_toc">
124 <a onclick="toggle_toc()">
125 <span class="fancy_toc_mark" id="toc_mk">&#x25ba;</span>
126 Table Of Contents
127 </a>
128 <div id="toc_sub"><div class="fancy-toc1"><a href="#result_codes_versus_error_codes">1. Result Codes versus Error Codes</a></div>
129 <div class="fancy-toc1"><a href="#primary_result_codes_versus_extended_result_codes">2. Primary Result Codes versus Extended Result Codes</a></div>
130 <div class="fancy-toc1"><a href="#definitions">3. Definitions</a></div>
131 <div class="fancy-toc1"><a href="#primary_result_code_list">4. Primary Result Code List</a></div>
132 <div class="fancy-toc1"><a href="#extended_result_code_list">5. Extended Result Code List</a></div>
133 <div class="fancy-toc1"><a href="#result_code_meanings">6. Result Code Meanings</a></div>
134 </div>
135 </div>
136 <script>
137 function toggle_toc(){
138 var sub = document.getElementById("toc_sub")
139 var mk = document.getElementById("toc_mk")
140 if( sub.style.display!="block" ){
141 sub.style.display = "block";
142 mk.innerHTML = "&#x25bc;";
143 } else {
144 sub.style.display = "none";
145 mk.innerHTML = "&#x25ba;";
146 }
147 }
148 </script>
149 </div>
150
151
152
153
154
155 <h2 style="margin-left:1.0em" notoc="1" id="overview"> Overview</h2>
156
157 <p>
158 Many of the routines in the SQLite <a href="c3ref/intro.html">C-language Interface</a> return
159 numeric result codes indicating either success or failure, and
160 in the event of a failure, providing some idea of the cause of
161 the failure. This document strives to explain what each
162 of those numeric result codes means.
163
164 </p><h1 id="result_codes_versus_error_codes"><span>1. </span>Result Codes versus Error Codes</h1>
165
166 <p>
167 "Error codes" are a subset of "result codes" that indicate that
168 something has gone wrong. There are only a few non-error result
169 codes: <a href="rescode.html#ok">SQLITE_OK</a>, <a href="rescode.html#row">SQLITE_ROW</a>, and <a href="rescode.html#done">SQLITE_DONE</a>. The term
170 "error code" means any result code other than these three.
171
172 <a name="pve"></a>
173
174 </p><h1 id="primary_result_codes_versus_extended_result_codes"><span>2. </span>Primary Result Codes versus Extended Result Codes</h1>
175
176 <p>
177 Result codes are signed 32-bit integers.
178 The least significant 8 bits of the result code define a broad category
179 and are called the "primary result code". More significant bits provide
180 more detailed information about the error and are called the
181 "extended result code"
182
183 </p><p>
184 Note that the primary result code is always a part of the extended
185 result code. Given a full 32-bit extended result code, the application
186 can always find the corresponding primary result code merely by extracting
187 the least significant 8 bits of the extended result code.
188
189 </p><p>
190 All extended result codes are also error codes. Hence the terms
191 "extended result code" and "extended error code" are interchangeable.
192
193 </p><p>
194 For historic compatibility, the C-language interfaces return
195 primary result codes by default.
196 The extended result code for the most recent error can be
197 retrieved using the <a href="c3ref/errcode.html">sqlite3_extended_errcode()</a> interface.
198 The <a href="c3ref/extended_result_codes.html">sqlite3_extended_result_codes()</a> interface can be used to put
199 a <a href="c3ref/sqlite3.html">database connection</a> into a mode where it returns the
200 extended result codes instead of the primary result codes.
201
202 </p><h1 id="definitions"><span>3. </span>Definitions</h1>
203
204 <p>
205 All result codes are integers.
206 Symbolic names for all result codes are created using
207 "#define" macros in the sqlite3.h header file.
208 There are separate sections in the sqlite3.h header file for
209 the <a href="c3ref/c_abort.html">result code definitions</a> and the <a href="c3ref/c_abort_rollback.html">extended result code definitions</a>.
210
211 </p><p>
212 Primary result code symbolic names are of the form "SQLITE_XXXXXX" where
213 XXXXXX is a sequence of uppercase alphabetic characters. Extended
214 result code names are of the form "SQLITE_XXXXXX_YYYYYYY" where
215 the XXXXXX part is the corresponding primary result code and the
216 YYYYYYY is an extension that further classifies the result code.
217
218 </p><p>
219 The names and numeric values for existing result codes are fixed
220 and unchanging. However, new result codes, and especially new extended
221 result codes, might appear in future releases of SQLite.
222
223
224 </p><h1 id="primary_result_code_list"><span>4. </span>Primary Result Code List</h1>
225 <p>The 31 result codes are
226 <a href="c3ref/c_abort.html">defined in sqlite3.h</a> and are listed in
227 alphabetical order below:
228 <div class='columns' style='columns: 16em auto;'>
229 <ul style='padding-top:0;'>
230 <li><a href='rescode.html#abort'>SQLITE_ABORT&nbsp;(4)</a></li>
231 <li><a href='rescode.html#auth'>SQLITE_AUTH&nbsp;(23)</a></li>
232 <li><a href='rescode.html#busy'>SQLITE_BUSY&nbsp;(5)</a></li>
233 <li><a href='rescode.html#cantopen'>SQLITE_CANTOPEN&nbsp;(14)</a></li>
234 <li><a href='rescode.html#constraint'>SQLITE_CONSTRAINT&nbsp;(19)</a></li>
235 <li><a href='rescode.html#corrupt'>SQLITE_CORRUPT&nbsp;(11)</a></li>
236 <li><a href='rescode.html#done'>SQLITE_DONE&nbsp;(101)</a></li>
237 <li><a href='rescode.html#empty'>SQLITE_EMPTY&nbsp;(16)</a></li>
238 <li><a href='rescode.html#error'>SQLITE_ERROR&nbsp;(1)</a></li>
239 <li><a href='rescode.html#format'>SQLITE_FORMAT&nbsp;(24)</a></li>
240 <li><a href='rescode.html#full'>SQLITE_FULL&nbsp;(13)</a></li>
241 <li><a href='rescode.html#internal'>SQLITE_INTERNAL&nbsp;(2)</a></li>
242 <li><a href='rescode.html#interrupt'>SQLITE_INTERRUPT&nbsp;(9)</a></li>
243 <li><a href='rescode.html#ioerr'>SQLITE_IOERR&nbsp;(10)</a></li>
244 <li><a href='rescode.html#locked'>SQLITE_LOCKED&nbsp;(6)</a></li>
245 <li><a href='rescode.html#mismatch'>SQLITE_MISMATCH&nbsp;(20)</a></li>
246 <li><a href='rescode.html#misuse'>SQLITE_MISUSE&nbsp;(21)</a></li>
247 <li><a href='rescode.html#nolfs'>SQLITE_NOLFS&nbsp;(22)</a></li>
248 <li><a href='rescode.html#nomem'>SQLITE_NOMEM&nbsp;(7)</a></li>
249 <li><a href='rescode.html#notadb'>SQLITE_NOTADB&nbsp;(26)</a></li>
250 <li><a href='rescode.html#notfound'>SQLITE_NOTFOUND&nbsp;(12)</a></li>
251 <li><a href='rescode.html#notice'>SQLITE_NOTICE&nbsp;(27)</a></li>
252 <li><a href='rescode.html#ok'>SQLITE_OK&nbsp;(0)</a></li>
253 <li><a href='rescode.html#perm'>SQLITE_PERM&nbsp;(3)</a></li>
254 <li><a href='rescode.html#protocol'>SQLITE_PROTOCOL&nbsp;(15)</a></li>
255 <li><a href='rescode.html#range'>SQLITE_RANGE&nbsp;(25)</a></li>
256 <li><a href='rescode.html#readonly'>SQLITE_READONLY&nbsp;(8)</a></li>
257 <li><a href='rescode.html#row'>SQLITE_ROW&nbsp;(100)</a></li>
258 <li><a href='rescode.html#schema'>SQLITE_SCHEMA&nbsp;(17)</a></li>
259 <li><a href='rescode.html#toobig'>SQLITE_TOOBIG&nbsp;(18)</a></li>
260 <li><a href='rescode.html#warning'>SQLITE_WARNING&nbsp;(28)</a></li>
261 </ul>
262 </div>
263 <a name="extrc"></a>
264
265 </p><h1 id="extended_result_code_list"><span>5. </span>Extended Result Code List</h1>
266 <p>The 74 extended result codes
267 are <a href="c3ref/c_abort_rollback.html">defined in sqlite3.h</a> and are
268 listed in alphabetical order below:
269 <div class='columns' style='columns: 22em auto;'>
270 <ul style='padding-top:0;'>
271 <li><a href='rescode.html#abort_rollback'>SQLITE_ABORT_ROLLBACK&nbsp;(516)</a></li>
272 <li><a href='rescode.html#auth_user'>SQLITE_AUTH_USER&nbsp;(279)</a></li>
273 <li><a href='rescode.html#busy_recovery'>SQLITE_BUSY_RECOVERY&nbsp;(261)</a></li>
274 <li><a href='rescode.html#busy_snapshot'>SQLITE_BUSY_SNAPSHOT&nbsp;(517)</a></li>
275 <li><a href='rescode.html#busy_timeout'>SQLITE_BUSY_TIMEOUT&nbsp;(773)</a></li>
276 <li><a href='rescode.html#cantopen_convpath'>SQLITE_CANTOPEN_CONVPATH&nbsp;(1038)</a></li>
277 <li><a href='rescode.html#cantopen_dirtywal'>SQLITE_CANTOPEN_DIRTYWAL&nbsp;(1294)</a></li>
278 <li><a href='rescode.html#cantopen_fullpath'>SQLITE_CANTOPEN_FULLPATH&nbsp;(782)</a></li>
279 <li><a href='rescode.html#cantopen_isdir'>SQLITE_CANTOPEN_ISDIR&nbsp;(526)</a></li>
280 <li><a href='rescode.html#cantopen_notempdir'>SQLITE_CANTOPEN_NOTEMPDIR&nbsp;(270)</a></li>
281 <li><a href='rescode.html#cantopen_symlink'>SQLITE_CANTOPEN_SYMLINK&nbsp;(1550)</a></li>
282 <li><a href='rescode.html#constraint_check'>SQLITE_CONSTRAINT_CHECK&nbsp;(275)</a></li>
283 <li><a href='rescode.html#constraint_commithook'>SQLITE_CONSTRAINT_COMMITHOOK&nbsp;(531)</a></li>
284 <li><a href='rescode.html#constraint_datatype'>SQLITE_CONSTRAINT_DATATYPE&nbsp;(3091)</a></li>
285 <li><a href='rescode.html#constraint_foreignkey'>SQLITE_CONSTRAINT_FOREIGNKEY&nbsp;(787)</a></li>
286 <li><a href='rescode.html#constraint_function'>SQLITE_CONSTRAINT_FUNCTION&nbsp;(1043)</a></li>
287 <li><a href='rescode.html#constraint_notnull'>SQLITE_CONSTRAINT_NOTNULL&nbsp;(1299)</a></li>
288 <li><a href='rescode.html#constraint_pinned'>SQLITE_CONSTRAINT_PINNED&nbsp;(2835)</a></li>
289 <li><a href='rescode.html#constraint_primarykey'>SQLITE_CONSTRAINT_PRIMARYKEY&nbsp;(1555)</a></li>
290 <li><a href='rescode.html#constraint_rowid'>SQLITE_CONSTRAINT_ROWID&nbsp;(2579)</a></li>
291 <li><a href='rescode.html#constraint_trigger'>SQLITE_CONSTRAINT_TRIGGER&nbsp;(1811)</a></li>
292 <li><a href='rescode.html#constraint_unique'>SQLITE_CONSTRAINT_UNIQUE&nbsp;(2067)</a></li>
293 <li><a href='rescode.html#constraint_vtab'>SQLITE_CONSTRAINT_VTAB&nbsp;(2323)</a></li>
294 <li><a href='rescode.html#corrupt_index'>SQLITE_CORRUPT_INDEX&nbsp;(779)</a></li>
295 <li><a href='rescode.html#corrupt_sequence'>SQLITE_CORRUPT_SEQUENCE&nbsp;(523)</a></li>
296 <li><a href='rescode.html#corrupt_vtab'>SQLITE_CORRUPT_VTAB&nbsp;(267)</a></li>
297 <li><a href='rescode.html#error_missing_collseq'>SQLITE_ERROR_MISSING_COLLSEQ&nbsp;(257)</a></li>
298 <li><a href='rescode.html#error_retry'>SQLITE_ERROR_RETRY&nbsp;(513)</a></li>
299 <li><a href='rescode.html#error_snapshot'>SQLITE_ERROR_SNAPSHOT&nbsp;(769)</a></li>
300 <li><a href='rescode.html#ioerr_access'>SQLITE_IOERR_ACCESS&nbsp;(3338)</a></li>
301 <li><a href='rescode.html#ioerr_auth'>SQLITE_IOERR_AUTH&nbsp;(7178)</a></li>
302 <li><a href='rescode.html#ioerr_begin_atomic'>SQLITE_IOERR_BEGIN_ATOMIC&nbsp;(7434)</a></li>
303 <li><a href='rescode.html#ioerr_blocked'>SQLITE_IOERR_BLOCKED&nbsp;(2826)</a></li>
304 <li><a href='rescode.html#ioerr_checkreservedlock'>SQLITE_IOERR_CHECKRESERVEDLOCK&nbsp;(3594)</a></li>
305 <li><a href='rescode.html#ioerr_close'>SQLITE_IOERR_CLOSE&nbsp;(4106)</a></li>
306 <li><a href='rescode.html#ioerr_commit_atomic'>SQLITE_IOERR_COMMIT_ATOMIC&nbsp;(7690)</a></li>
307 <li><a href='rescode.html#ioerr_convpath'>SQLITE_IOERR_CONVPATH&nbsp;(6666)</a></li>
308 <li><a href='rescode.html#ioerr_corruptfs'>SQLITE_IOERR_CORRUPTFS&nbsp;(8458)</a></li>
309 <li><a href='rescode.html#ioerr_data'>SQLITE_IOERR_DATA&nbsp;(8202)</a></li>
310 <li><a href='rescode.html#ioerr_delete'>SQLITE_IOERR_DELETE&nbsp;(2570)</a></li>
311 <li><a href='rescode.html#ioerr_delete_noent'>SQLITE_IOERR_DELETE_NOENT&nbsp;(5898)</a></li>
312 <li><a href='rescode.html#ioerr_dir_close'>SQLITE_IOERR_DIR_CLOSE&nbsp;(4362)</a></li>
313 <li><a href='rescode.html#ioerr_dir_fsync'>SQLITE_IOERR_DIR_FSYNC&nbsp;(1290)</a></li>
314 <li><a href='rescode.html#ioerr_fstat'>SQLITE_IOERR_FSTAT&nbsp;(1802)</a></li>
315 <li><a href='rescode.html#ioerr_fsync'>SQLITE_IOERR_FSYNC&nbsp;(1034)</a></li>
316 <li><a href='rescode.html#ioerr_gettemppath'>SQLITE_IOERR_GETTEMPPATH&nbsp;(6410)</a></li>
317 <li><a href='rescode.html#ioerr_lock'>SQLITE_IOERR_LOCK&nbsp;(3850)</a></li>
318 <li><a href='rescode.html#ioerr_mmap'>SQLITE_IOERR_MMAP&nbsp;(6154)</a></li>
319 <li><a href='rescode.html#ioerr_nomem'>SQLITE_IOERR_NOMEM&nbsp;(3082)</a></li>
320 <li><a href='rescode.html#ioerr_rdlock'>SQLITE_IOERR_RDLOCK&nbsp;(2314)</a></li>
321 <li><a href='rescode.html#ioerr_read'>SQLITE_IOERR_READ&nbsp;(266)</a></li>
322 <li><a href='rescode.html#ioerr_rollback_atomic'>SQLITE_IOERR_ROLLBACK_ATOMIC&nbsp;(7946)</a></li>
323 <li><a href='rescode.html#ioerr_seek'>SQLITE_IOERR_SEEK&nbsp;(5642)</a></li>
324 <li><a href='rescode.html#ioerr_shmlock'>SQLITE_IOERR_SHMLOCK&nbsp;(5130)</a></li>
325 <li><a href='rescode.html#ioerr_shmmap'>SQLITE_IOERR_SHMMAP&nbsp;(5386)</a></li>
326 <li><a href='rescode.html#ioerr_shmopen'>SQLITE_IOERR_SHMOPEN&nbsp;(4618)</a></li>
327 <li><a href='rescode.html#ioerr_shmsize'>SQLITE_IOERR_SHMSIZE&nbsp;(4874)</a></li>
328 <li><a href='rescode.html#ioerr_short_read'>SQLITE_IOERR_SHORT_READ&nbsp;(522)</a></li>
329 <li><a href='rescode.html#ioerr_truncate'>SQLITE_IOERR_TRUNCATE&nbsp;(1546)</a></li>
330 <li><a href='rescode.html#ioerr_unlock'>SQLITE_IOERR_UNLOCK&nbsp;(2058)</a></li>
331 <li><a href='rescode.html#ioerr_vnode'>SQLITE_IOERR_VNODE&nbsp;(6922)</a></li>
332 <li><a href='rescode.html#ioerr_write'>SQLITE_IOERR_WRITE&nbsp;(778)</a></li>
333 <li><a href='rescode.html#locked_sharedcache'>SQLITE_LOCKED_SHAREDCACHE&nbsp;(262)</a></li>
334 <li><a href='rescode.html#locked_vtab'>SQLITE_LOCKED_VTAB&nbsp;(518)</a></li>
335 <li><a href='rescode.html#notice_recover_rollback'>SQLITE_NOTICE_RECOVER_ROLLBACK&nbsp;(539)</a></li>
336 <li><a href='rescode.html#notice_recover_wal'>SQLITE_NOTICE_RECOVER_WAL&nbsp;(283)</a></li>
337 <li><a href='rescode.html#ok_load_permanently'>SQLITE_OK_LOAD_PERMANENTLY&nbsp;(256)</a></li>
338 <li><a href='rescode.html#readonly_cantinit'>SQLITE_READONLY_CANTINIT&nbsp;(1288)</a></li>
339 <li><a href='rescode.html#readonly_cantlock'>SQLITE_READONLY_CANTLOCK&nbsp;(520)</a></li>
340 <li><a href='rescode.html#readonly_dbmoved'>SQLITE_READONLY_DBMOVED&nbsp;(1032)</a></li>
341 <li><a href='rescode.html#readonly_directory'>SQLITE_READONLY_DIRECTORY&nbsp;(1544)</a></li>
342 <li><a href='rescode.html#readonly_recovery'>SQLITE_READONLY_RECOVERY&nbsp;(264)</a></li>
343 <li><a href='rescode.html#readonly_rollback'>SQLITE_READONLY_ROLLBACK&nbsp;(776)</a></li>
344 <li><a href='rescode.html#warning_autoindex'>SQLITE_WARNING_AUTOINDEX&nbsp;(284)</a></li>
345 </ul>
346 </div>
347
348 </p><h1 id="result_code_meanings"><span>6. </span>Result Code Meanings</h1>
349 <p>
350 The meanings for all 105
351 result code values are shown below,
352 in numeric order.
353
354 <!--------------------------------------------------------------->
355 <a name="ok"></a>
356 <h3>(0) SQLITE_OK</h3>
357 <p>
358 The SQLITE_OK result code means that the operation was successful and
359 that there were no errors. Most other result codes indicate an error.
360
361
362 <!--------------------------------------------------------------->
363 <a name="error"></a>
364 <h3>(1) SQLITE_ERROR</h3>
365 <p>
366 The SQLITE_ERROR result code is a generic error code that is used when
367 no other more specific error code is available.
368
369
370 <!--------------------------------------------------------------->
371 <a name="internal"></a>
372 <h3>(2) SQLITE_INTERNAL</h3>
373 <p>
374 The SQLITE_INTERNAL result code indicates an internal malfunction.
375 In a working version of SQLite, an application should never see this
376 result code. If application does encounter this result code, it shows
377 that there is a bug in the database engine.
378 <p>
379 This result code might be caused by a bug in SQLite.
380 However, <a href="appfunc.html">application-defined SQL functions</a> or
381 <a href="vtab.html">virtual tables</a>, or <a href="vfs.html">VFSes</a>, or other extensions can also cause this
382 result code to be returned, so the problem might not be the fault
383 of the core SQLite.
384
385
386 <!--------------------------------------------------------------->
387 <a name="perm"></a>
388 <h3>(3) SQLITE_PERM</h3>
389 <p>
390 The SQLITE_PERM result code indicates that the requested access mode
391 for a newly created database could not be provided.
392
393
394 <!--------------------------------------------------------------->
395 <a name="abort"></a>
396 <h3>(4) SQLITE_ABORT</h3>
397 <p>
398 The SQLITE_ABORT result code indicates that an operation was aborted
399 prior to completion, usually be application request.
400 See also: <a href="rescode.html#interrupt">SQLITE_INTERRUPT</a>.
401 <p>
402 If the callback function to <a href="c3ref/exec.html">sqlite3_exec()</a> returns non-zero, then
403 sqlite3_exec() will return SQLITE_ABORT.
404 <p>
405 If a <a href="lang_transaction.html">ROLLBACK</a> operation occurs on the same <a href="c3ref/sqlite3.html">database connection</a> as
406 a pending read or write, then the pending read or write may fail with
407 an SQLITE_ABORT or <a href="rescode.html#abort_rollback">SQLITE_ABORT_ROLLBACK</a> error.
408 <p>
409 In addition to being a result code,
410 the SQLITE_ABORT value is also used as a <a href="c3ref/c_fail.html">conflict resolution mode</a>
411 returned from the <a href="c3ref/vtab_on_conflict.html">sqlite3_vtab_on_conflict()</a> interface.
412
413
414 <!--------------------------------------------------------------->
415 <a name="busy"></a>
416 <h3>(5) SQLITE_BUSY</h3>
417 <p>
418 The SQLITE_BUSY result code indicates that the database file could not
419 be written (or in some cases read) because of concurrent activity by
420 some other <a href="c3ref/sqlite3.html">database connection</a>, usually a database connection in a
421 separate process.
422 <p>
423 For example, if process A is in the middle of a large write transaction
424 and at the same time process B attempts to start a new write transaction,
425 process B will get back an SQLITE_BUSY result because SQLite only supports
426 one writer at a time. Process B will need to wait for process A to finish
427 its transaction before starting a new transaction. The
428 <a href="c3ref/busy_timeout.html">sqlite3_busy_timeout()</a> and <a href="c3ref/busy_handler.html">sqlite3_busy_handler()</a> interfaces and
429 the <a href="pragma.html#pragma_busy_timeout">busy_timeout pragma</a> are available to process B to help it deal
430 with SQLITE_BUSY errors.
431 <p>
432 An SQLITE_BUSY error can occur at any point in a transaction: when the
433 transaction is first started, during any write or update operations, or
434 when the transaction commits.
435 To avoid encountering SQLITE_BUSY errors in the middle of a transaction,
436 the application can use <a href="lang_transaction.html#immediate">BEGIN IMMEDIATE</a> instead of just <a href="lang_transaction.html">BEGIN</a> to
437 start a transaction. The <a href="lang_transaction.html#immediate">BEGIN IMMEDIATE</a> command might itself return
438 SQLITE_BUSY, but if it succeeds, then SQLite guarantees that no
439 subsequent operations on the same database through the next <a href="lang_transaction.html">COMMIT</a>
440 will return SQLITE_BUSY.
441 <p>
442 See also: <a href="rescode.html#busy_recovery">SQLITE_BUSY_RECOVERY</a> and <a href="rescode.html#busy_snapshot">SQLITE_BUSY_SNAPSHOT</a>.
443 <p>
444 The SQLITE_BUSY result code differs from <a href="rescode.html#locked">SQLITE_LOCKED</a> in that
445 SQLITE_BUSY indicates a conflict with a
446 separate <a href="c3ref/sqlite3.html">database connection</a>, probably in a separate process,
447 whereas <a href="rescode.html#locked">SQLITE_LOCKED</a>
448 indicates a conflict within the same <a href="c3ref/sqlite3.html">database connection</a> (or sometimes
449 a database connection with a <a href="sharedcache.html">shared cache</a>).
450
451
452 <!--------------------------------------------------------------->
453 <a name="locked"></a>
454 <h3>(6) SQLITE_LOCKED</h3>
455 <p>
456 The SQLITE_LOCKED result code indicates that a write operation could not
457 continue because of a conflict within the same <a href="c3ref/sqlite3.html">database connection</a> or
458 a conflict with a different database connection that uses a <a href="sharedcache.html">shared cache</a>.
459 <p>
460 For example, a <a href="lang_droptable.html">DROP TABLE</a> statement cannot be run while another thread
461 is reading from that table on the same <a href="c3ref/sqlite3.html">database connection</a> because
462 dropping the table would delete the table out from under the concurrent
463 reader.
464 <p>
465 The SQLITE_LOCKED result code differs from <a href="rescode.html#busy">SQLITE_BUSY</a> in that
466 SQLITE_LOCKED indicates a conflict on the same <a href="c3ref/sqlite3.html">database connection</a>
467 (or on a connection with a <a href="sharedcache.html">shared cache</a>) whereas <a href="rescode.html#busy">SQLITE_BUSY</a> indicates
468 a conflict with a different database connection, probably in a different
469 process.
470
471
472 <!--------------------------------------------------------------->
473 <a name="nomem"></a>
474 <h3>(7) SQLITE_NOMEM</h3>
475 <p>
476 The SQLITE_NOMEM result code indicates that SQLite was unable to allocate
477 all the memory it needed to complete the operation. In other words, an
478 internal call to <a href="c3ref/free.html">sqlite3_malloc()</a> or <a href="c3ref/free.html">sqlite3_realloc()</a> has failed in
479 a case where the memory being allocated was required in order to continue
480 the operation.
481
482
483 <!--------------------------------------------------------------->
484 <a name="readonly"></a>
485 <h3>(8) SQLITE_READONLY</h3>
486 <p>
487 The SQLITE_READONLY result code is returned when an attempt is made to
488 alter some data for which the current database connection does not have
489 write permission.
490
491
492 <!--------------------------------------------------------------->
493 <a name="interrupt"></a>
494 <h3>(9) SQLITE_INTERRUPT</h3>
495 <p>
496 The SQLITE_INTERRUPT result code indicates that an operation was
497 interrupted by the <a href="c3ref/interrupt.html">sqlite3_interrupt()</a> interface.
498 See also: <a href="rescode.html#abort">SQLITE_ABORT</a>
499
500
501 <!--------------------------------------------------------------->
502 <a name="ioerr"></a>
503 <h3>(10) SQLITE_IOERR</h3>
504 <p>
505 The SQLITE_IOERR result code says that the operation could not finish
506 because the operating system reported an I/O error.
507 <p>
508 A full disk drive will normally give an <a href="rescode.html#full">SQLITE_FULL</a> error rather than
509 an SQLITE_IOERR error.
510 <p>
511 There are many different extended result codes for I/O errors that
512 identify the specific I/O operation that failed.
513
514
515 <!--------------------------------------------------------------->
516 <a name="corrupt"></a>
517 <h3>(11) SQLITE_CORRUPT</h3>
518 <p>
519 The SQLITE_CORRUPT result code indicates that the database file has
520 been corrupted. See the <a href="lockingv3.html#how_to_corrupt">How To Corrupt Your Database Files</a> for
521 further discussion on how corruption can occur.
522
523
524 <!--------------------------------------------------------------->
525 <a name="notfound"></a>
526 <h3>(12) SQLITE_NOTFOUND</h3>
527 <p>
528 The SQLITE_NOTFOUND result code is exposed in three ways:
529 <ol>
530 <li><p>
531 SQLITE_NOTFOUND can be returned by the <a href="c3ref/file_control.html">sqlite3_file_control()</a> interface
532 to indicate that the <a href="c3ref/c_fcntl_begin_atomic_write.html">file control opcode</a> passed as the third argument
533 was not recognized by the underlying <a href="vfs.html">VFS</a>.
534 <li><p>
535 SQLITE_NOTFOUND can also be returned by the xSetSystemCall() method of
536 an <a href="c3ref/vfs.html">sqlite3_vfs</a> object.
537 <li><p>
538 SQLITE_NOTFOUND can be returned by <a href="c3ref/vtab_rhs_value.html">sqlite3_vtab_rhs_value()</a> to indicate
539 that the right-hand operand of a constraint is not available to the
540 <a href="vtab.html#xbestindex">xBestIndex method</a> that made the call.
541 </ol>
542 <p>
543 The SQLITE_NOTFOUND result code is also used
544 internally by the SQLite implementation, but those internal uses are
545 not exposed to the application.
546
547
548 <!--------------------------------------------------------------->
549 <a name="full"></a>
550 <h3>(13) SQLITE_FULL</h3>
551 <p>
552 The SQLITE_FULL result code indicates that a write could not complete
553 because the disk is full. Note that this error can occur when trying
554 to write information into the main database file, or it can also
555 occur when writing into <a href="tempfiles.html">temporary disk files</a>.
556 <p>
557 Sometimes applications encounter this error even though there is an
558 abundance of primary disk space because the error occurs when writing
559 into <a href="tempfiles.html">temporary disk files</a> on a system where temporary files are stored
560 on a separate partition with much less space that the primary disk.
561
562
563 <!--------------------------------------------------------------->
564 <a name="cantopen"></a>
565 <h3>(14) SQLITE_CANTOPEN</h3>
566 <p>
567 The SQLITE_CANTOPEN result code indicates that SQLite was unable to
568 open a file. The file in question might be a primary database file
569 or one of several <a href="tempfiles.html">temporary disk files</a>.
570
571
572 <!--------------------------------------------------------------->
573 <a name="protocol"></a>
574 <h3>(15) SQLITE_PROTOCOL</h3>
575 <p>
576 The SQLITE_PROTOCOL result code indicates a problem with the file locking
577 protocol used by SQLite. The SQLITE_PROTOCOL error is currently only
578 returned when using <a href="wal.html">WAL mode</a> and attempting to start a new transaction.
579 There is a race condition that can occur when two separate
580 <a href="c3ref/sqlite3.html">database connections</a> both try to start a transaction at the same time
581 in <a href="wal.html">WAL mode</a>. The loser of the race backs off and tries again, after
582 a brief delay. If the same connection loses the locking race dozens
583 of times over a span of multiple seconds, it will eventually give up and
584 return SQLITE_PROTOCOL. The SQLITE_PROTOCOL error should appear in practice
585 very, very rarely, and only when there are many separate processes all
586 competing intensely to write to the same database.
587
588
589 <!--------------------------------------------------------------->
590 <a name="empty"></a>
591 <h3>(16) SQLITE_EMPTY</h3>
592 <p>
593 The SQLITE_EMPTY result code is not currently used.
594
595
596 <!--------------------------------------------------------------->
597 <a name="schema"></a>
598 <h3>(17) SQLITE_SCHEMA</h3>
599 <p>
600 The SQLITE_SCHEMA result code indicates that the database schema
601 has changed. This result code can be returned from <a href="c3ref/step.html">sqlite3_step()</a> for
602 a <a href="c3ref/stmt.html">prepared statement</a> that was generated using <a href="c3ref/prepare.html">sqlite3_prepare()</a> or
603 <a href="c3ref/prepare.html">sqlite3_prepare16()</a>. If the database schema was changed by some other
604 process in between the time that the statement was prepared and the time
605 the statement was run, this error can result.
606 <p>
607 If a <a href="c3ref/stmt.html">prepared statement</a> is generated from <a href="c3ref/prepare.html">sqlite3_prepare_v2()</a> then
608 the statement is automatically re-prepared if the schema changes, up to
609 <a href="compile.html#max_schema_retry">SQLITE_MAX_SCHEMA_RETRY</a> times (default: 50). The <a href="c3ref/step.html">sqlite3_step()</a>
610 interface will only return SQLITE_SCHEMA back to the application if
611 the failure persists after these many retries.
612
613
614 <!--------------------------------------------------------------->
615 <a name="toobig"></a>
616 <h3>(18) SQLITE_TOOBIG</h3>
617 <p>
618 The SQLITE_TOOBIG error code indicates that a string or BLOB was
619 too large. The default maximum length of a string or BLOB in SQLite is
620 1,000,000,000 bytes. This maximum length can be changed at compile-time
621 using the <a href="limits.html#max_length">SQLITE_MAX_LENGTH</a> compile-time option, or at run-time using
622 the <a href="c3ref/limit.html">sqlite3_limit</a>(db,<a href="c3ref/c_limit_attached.html#sqlitelimitlength">SQLITE_LIMIT_LENGTH</a>,...) interface. The
623 SQLITE_TOOBIG error results when SQLite encounters a string or BLOB
624 that exceeds the compile-time or run-time limit.
625 <p>
626 The SQLITE_TOOBIG error code can also result when an oversized SQL
627 statement is passed into one of the <a href="c3ref/prepare.html">sqlite3_prepare_v2()</a> interfaces.
628 The maximum length of an SQL statement defaults to a much smaller
629 value of 1,000,000,000 bytes. The maximum SQL statement length can be
630 set at compile-time using <a href="limits.html#max_sql_length">SQLITE_MAX_SQL_LENGTH</a> or at run-time
631 using <a href="c3ref/limit.html">sqlite3_limit</a>(db,<a href="c3ref/c_limit_attached.html#sqlitelimitsqllength">SQLITE_LIMIT_SQL_LENGTH</a>,...).
632
633
634 <!--------------------------------------------------------------->
635 <a name="constraint"></a>
636 <h3>(19) SQLITE_CONSTRAINT</h3>
637 <p>
638 The SQLITE_CONSTRAINT error code means that an SQL constraint violation
639 occurred while trying to process an SQL statement. Additional information
640 about the failed constraint can be found by consulting the
641 accompanying error message (returned via <a href="c3ref/errcode.html">sqlite3_errmsg()</a> or
642 <a href="c3ref/errcode.html">sqlite3_errmsg16()</a>) or by looking at the <a href="rescode.html#extrc">extended error code</a>.
643 <p>
644 The SQLITE_CONSTRAINT code can also be used as the return value from
645 the <a href="vtab.html#xbestindex">xBestIndex()</a> method of a <a href="vtab.html">virtual table</a> implementation. When
646 xBestIndex() returns SQLITE_CONSTRAINT, that indicates that the particular
647 combination of inputs submitted to xBestIndex() cannot result in a
648 usable query plan and should not be given further consideration.
649
650
651 <!--------------------------------------------------------------->
652 <a name="mismatch"></a>
653 <h3>(20) SQLITE_MISMATCH</h3>
654 <p>
655 The SQLITE_MISMATCH error code indicates a datatype mismatch.
656 <p>
657 SQLite is normally very forgiving about mismatches between the type of
658 a value and the declared type of the container in which that value is
659 to be stored. For example, SQLite allows the application to store
660 a large BLOB in a column with a declared type of BOOLEAN. But in a few
661 cases, SQLite is strict about types. The SQLITE_MISMATCH error is
662 returned in those few cases when the types do not match.
663 <p>
664 The <a href="lang_createtable.html#rowid">rowid</a> of a table must be an integer. Attempt to set the <a href="lang_createtable.html#rowid">rowid</a>
665 to anything other than an integer (or a NULL which will be automatically
666 converted into the next available integer rowid) results in an
667 SQLITE_MISMATCH error.
668
669
670 <!--------------------------------------------------------------->
671 <a name="misuse"></a>
672 <h3>(21) SQLITE_MISUSE</h3>
673 <p>
674 The SQLITE_MISUSE return code might be returned if the application uses
675 any SQLite interface in a way that is undefined or unsupported. For
676 example, using a <a href="c3ref/stmt.html">prepared statement</a> after that prepared statement has
677 been <a href="c3ref/finalize.html">finalized</a> might result in an SQLITE_MISUSE error.
678 <p>
679 SQLite tries to detect misuse and report the misuse using this result code.
680 However, there is no guarantee that the detection of misuse will be
681 successful. Misuse detection is probabilistic. Applications should
682 never depend on an SQLITE_MISUSE return value.
683 <p>
684 If SQLite ever returns SQLITE_MISUSE from any interface, that means that
685 the application is incorrectly coded and needs to be fixed. Do not ship
686 an application that sometimes returns SQLITE_MISUSE from a standard
687 SQLite interface because that application contains potentially serious bugs.
688
689
690 <!--------------------------------------------------------------->
691 <a name="nolfs"></a>
692 <h3>(22) SQLITE_NOLFS</h3>
693 <p>
694 The SQLITE_NOLFS error can be returned on systems that do not support
695 large files when the database grows to be larger than what the filesystem
696 can handle. "NOLFS" stands for "NO Large File Support".
697
698
699 <!--------------------------------------------------------------->
700 <a name="auth"></a>
701 <h3>(23) SQLITE_AUTH</h3>
702 <p>
703 The SQLITE_AUTH error is returned when the
704 <a href="c3ref/set_authorizer.html">authorizer callback</a> indicates that an
705 SQL statement being prepared is not authorized.
706
707
708 <!--------------------------------------------------------------->
709 <a name="format"></a>
710 <h3>(24) SQLITE_FORMAT</h3>
711 <p>
712 The SQLITE_FORMAT error code is not currently used by SQLite.
713
714
715 <!--------------------------------------------------------------->
716 <a name="range"></a>
717 <h3>(25) SQLITE_RANGE</h3>
718 <p>
719 The SQLITE_RANGE error indices that the parameter number argument
720 to one of the <a href="c3ref/bind_blob.html">sqlite3_bind</a> routines or the
721 column number in one of the <a href="c3ref/column_blob.html">sqlite3_column</a>
722 routines is out of range.
723
724
725 <!--------------------------------------------------------------->
726 <a name="notadb"></a>
727 <h3>(26) SQLITE_NOTADB</h3>
728 <p>
729 When attempting to open a file, the SQLITE_NOTADB error indicates that
730 the file being opened does not appear to be an SQLite database file.
731
732
733 <!--------------------------------------------------------------->
734 <a name="notice"></a>
735 <h3>(27) SQLITE_NOTICE</h3>
736 <p>
737 The SQLITE_NOTICE result code is not returned by any C/C++ interface.
738 However, SQLITE_NOTICE (or rather one of its <a href="rescode.html#extrc">extended error codes</a>)
739 is sometimes used as the first argument in an <a href="c3ref/log.html">sqlite3_log()</a> callback
740 to indicate that an unusual operation is taking place.
741
742
743 <!--------------------------------------------------------------->
744 <a name="warning"></a>
745 <h3>(28) SQLITE_WARNING</h3>
746 <p>
747 The SQLITE_WARNING result code is not returned by any C/C++ interface.
748 However, SQLITE_WARNING (or rather one of its <a href="rescode.html#extrc">extended error codes</a>)
749 is sometimes used as the first argument in an <a href="c3ref/log.html">sqlite3_log()</a> callback
750 to indicate that an unusual and possibly ill-advised operation is
751 taking place.
752
753
754 <!--------------------------------------------------------------->
755 <a name="row"></a>
756 <h3>(100) SQLITE_ROW</h3>
757 <p>
758 The SQLITE_ROW result code returned by
759 <a href="c3ref/step.html">sqlite3_step()</a> indicates that another row of output is available.
760
761
762 <!--------------------------------------------------------------->
763 <a name="done"></a>
764 <h3>(101) SQLITE_DONE</h3>
765 <p>
766 The SQLITE_DONE result code indicates that an operation has completed.
767 The SQLITE_DONE result code is most commonly seen as a return value
768 from <a href="c3ref/step.html">sqlite3_step()</a> indicating that the SQL statement has run to
769 completion. But SQLITE_DONE can also be returned by other multi-step
770 interfaces such as <a href="c3ref/backup_finish.html#sqlite3backupstep">sqlite3_backup_step()</a>.
771
772
773 <!--------------------------------------------------------------->
774 <a name="ok_load_permanently"></a>
775 <h3>(256) SQLITE_OK_LOAD_PERMANENTLY</h3>
776 <p>
777 The <a href="c3ref/load_extension.html">sqlite3_load_extension()</a> interface loads an
778 <a href="loadext.html">extension</a> into a single
779 database connection. The default behavior is for that extension to be
780 automatically unloaded when the database connection closes. However,
781 if the extension entry point returns SQLITE_OK_LOAD_PERMANENTLY instead
782 of SQLITE_OK, then the extension remains loaded into the process address
783 space after the database connection closes. In other words, the
784 xDlClose methods of the <a href="c3ref/vfs.html">sqlite3_vfs</a> object is not called for the
785 extension when the database connection closes.
786 <p>
787 The SQLITE_OK_LOAD_PERMANENTLY return code is useful to
788 <a href="loadext.html">loadable extensions</a> that register new <a href="vfs.html">VFSes</a>, for example.
789
790
791 <!--------------------------------------------------------------->
792 <a name="error_missing_collseq"></a>
793 <h3>(257) SQLITE_ERROR_MISSING_COLLSEQ</h3>
794 <p>
795 The SQLITE_ERROR_MISSING_COLLSEQ result code means that an SQL
796 statement could not be prepared because a collating sequence named
797 in that SQL statement could not be located.
798 <p>
799 Sometimes when this error code is encountered, the
800 <a href="c3ref/prepare.html">sqlite3_prepare_v2()</a> routine will convert the error into
801 <a href="rescode.html#error_retry">SQLITE_ERROR_RETRY</a> and try again to prepare the SQL statement
802 using a different query plan that does not require the use of
803 the unknown collating sequence.
804
805
806 <!--------------------------------------------------------------->
807 <a name="busy_recovery"></a>
808 <h3>(261) SQLITE_BUSY_RECOVERY</h3>
809 <p>
810 The SQLITE_BUSY_RECOVERY error code is an <a href="rescode.html#pve">extended error code</a>
811 for <a href="rescode.html#busy">SQLITE_BUSY</a> that indicates that an operation could not continue
812 because another process is busy recovering a <a href="wal.html">WAL mode</a> database file
813 following a crash. The SQLITE_BUSY_RECOVERY error code only occurs
814 on <a href="wal.html">WAL mode</a> databases.
815
816
817 <!--------------------------------------------------------------->
818 <a name="locked_sharedcache"></a>
819 <h3>(262) SQLITE_LOCKED_SHAREDCACHE</h3>
820 <p>
821 The SQLITE_LOCKED_SHAREDCACHE result code indicates that access to
822 an SQLite data record is blocked by another database connection that
823 is using the same record in <a href="sharedcache.html">shared cache mode</a>. When two or more
824 database connections share the same cache and one of the connections is
825 in the middle of modifying a record in that cache, then other connections
826 are blocked from accessing that data while the modifications are on-going
827 in order to prevent the readers from seeing a corrupt or partially
828 completed change.
829
830
831 <!--------------------------------------------------------------->
832 <a name="readonly_recovery"></a>
833 <h3>(264) SQLITE_READONLY_RECOVERY</h3>
834 <p>
835 The SQLITE_READONLY_RECOVERY error code is an <a href="rescode.html#pve">extended error code</a>
836 for <a href="rescode.html#readonly">SQLITE_READONLY</a>. The SQLITE_READONLY_RECOVERY error code indicates
837 that a <a href="wal.html">WAL mode</a> database cannot be opened because the database file
838 needs to be recovered and recovery requires write access but only
839 read access is available.
840
841
842 <!--------------------------------------------------------------->
843 <a name="ioerr_read"></a>
844 <h3>(266) SQLITE_IOERR_READ</h3>
845 <p>
846 The SQLITE_IOERR_READ error code is an <a href="rescode.html#pve">extended error code</a>
847 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
848 while trying to read from a file on disk. This error might result
849 from a hardware malfunction or because a filesystem came unmounted
850 while the file was open.
851
852
853 <!--------------------------------------------------------------->
854 <a name="corrupt_vtab"></a>
855 <h3>(267) SQLITE_CORRUPT_VTAB</h3>
856 <p>
857 The SQLITE_CORRUPT_VTAB error code is an <a href="rescode.html#pve">extended error code</a>
858 for <a href="rescode.html#corrupt">SQLITE_CORRUPT</a> used by <a href="vtab.html">virtual tables</a>. A <a href="vtab.html">virtual table</a> might
859 return SQLITE_CORRUPT_VTAB to indicate that content in the virtual table
860 is corrupt.
861
862
863 <!--------------------------------------------------------------->
864 <a name="cantopen_notempdir"></a>
865 <h3>(270) SQLITE_CANTOPEN_NOTEMPDIR</h3>
866 <p>
867 The SQLITE_CANTOPEN_NOTEMPDIR error code is no longer used.
868
869
870 <!--------------------------------------------------------------->
871 <a name="constraint_check"></a>
872 <h3>(275) SQLITE_CONSTRAINT_CHECK</h3>
873 <p>
874 The SQLITE_CONSTRAINT_CHECK error code is an <a href="rescode.html#pve">extended error code</a>
875 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtable.html#ckconst">CHECK constraint</a> failed.
876
877
878 <!--------------------------------------------------------------->
879 <a name="auth_user"></a>
880 <h3>(279) SQLITE_AUTH_USER</h3>
881 <p>
882 The SQLITE_AUTH_USER error code is an <a href="rescode.html#pve">extended error code</a>
883 for <a href="rescode.html#auth">SQLITE_AUTH</a> indicating that an operation was attempted on a
884 database for which the logged in user lacks sufficient authorization.
885
886
887 <!--------------------------------------------------------------->
888 <a name="notice_recover_wal"></a>
889 <h3>(283) SQLITE_NOTICE_RECOVER_WAL</h3>
890 <p>
891 The SQLITE_NOTICE_RECOVER_WAL result code is
892 passed to the callback of
893 <a href="c3ref/log.html">sqlite3_log()</a> when a <a href="wal.html">WAL mode</a> database file is recovered.
894
895
896 <!--------------------------------------------------------------->
897 <a name="warning_autoindex"></a>
898 <h3>(284) SQLITE_WARNING_AUTOINDEX</h3>
899 <p>
900 The SQLITE_WARNING_AUTOINDEX result code is
901 passed to the callback of
902 <a href="c3ref/log.html">sqlite3_log()</a> whenever <a href="optoverview.html#autoindex">automatic indexing</a> is used.
903 This can serve as a warning to application designers that the
904 database might benefit from additional indexes.
905
906
907 <!--------------------------------------------------------------->
908 <a name="error_retry"></a>
909 <h3>(513) SQLITE_ERROR_RETRY</h3>
910 <p>
911 The SQLITE_ERROR_RETRY is used internally to provoke <a href="c3ref/prepare.html">sqlite3_prepare_v2()</a>
912 (or one of its sibling routines for creating prepared statements) to
913 try again to prepare a statement that failed with an error on the
914 previous attempt.
915
916
917 <!--------------------------------------------------------------->
918 <a name="abort_rollback"></a>
919 <h3>(516) SQLITE_ABORT_ROLLBACK</h3>
920 <p>
921 The SQLITE_ABORT_ROLLBACK error code is an <a href="rescode.html#pve">extended error code</a>
922 for <a href="rescode.html#abort">SQLITE_ABORT</a> indicating that an SQL statement aborted because
923 the transaction that was active when the SQL statement first started
924 was rolled back. Pending write operations always fail with this error
925 when a rollback occurs. A <a href="lang_transaction.html">ROLLBACK</a> will cause a pending read operation
926 to fail only if the schema was changed within the transaction being rolled
927 back.
928
929
930 <!--------------------------------------------------------------->
931 <a name="busy_snapshot"></a>
932 <h3>(517) SQLITE_BUSY_SNAPSHOT</h3>
933 <p>
934 The SQLITE_BUSY_SNAPSHOT error code is an <a href="rescode.html#pve">extended error code</a>
935 for <a href="rescode.html#busy">SQLITE_BUSY</a> that occurs on <a href="wal.html">WAL mode</a> databases when a database
936 connection tries to promote a read transaction into a write transaction
937 but finds that another <a href="c3ref/sqlite3.html">database connection</a> has already written to the
938 database and thus invalidated prior reads.
939 <p>
940 The following scenario illustrates how an SQLITE_BUSY_SNAPSHOT error
941 might arise:
942 <ol>
943 <li> Process A starts a read transaction on the database and does one
944 or more SELECT statement. Process A keeps the transaction open.
945 <li> Process B updates the database, changing values previous read by
946 process A.
947 <li> Process A now tries to write to the database. But process A's view
948 of the database content is now obsolete because process B has
949 modified the database file after process A read from it. Hence
950 process A gets an SQLITE_BUSY_SNAPSHOT error.
951 </ol>
952
953
954 <!--------------------------------------------------------------->
955 <a name="locked_vtab"></a>
956 <h3>(518) SQLITE_LOCKED_VTAB</h3>
957 <p>
958 The SQLITE_LOCKED_VTAB result code is not used by the SQLite core, but
959 it is available for use by extensions. Virtual table implementations
960 can return this result code to indicate that they cannot complete the
961 current operation because of locks held by other threads or processes.
962 <p>
963 The <a href="rtree.html">R-Tree extension</a> returns this result code when an attempt is made
964 to update the R-Tree while another prepared statement is actively reading
965 the R-Tree. The update cannot proceed because any change to an R-Tree
966 might involve reshuffling and rebalancing of nodes, which would disrupt
967 read cursors, causing some rows to be repeated and other rows to be
968 omitted.
969
970
971 <!--------------------------------------------------------------->
972 <a name="readonly_cantlock"></a>
973 <h3>(520) SQLITE_READONLY_CANTLOCK</h3>
974 <p>
975 The SQLITE_READONLY_CANTLOCK error code is an <a href="rescode.html#pve">extended error code</a>
976 for <a href="rescode.html#readonly">SQLITE_READONLY</a>. The SQLITE_READONLY_CANTLOCK error code indicates
977 that SQLite is unable to obtain a read lock on a <a href="wal.html">WAL mode</a> database
978 because the shared-memory file associated with that database is read-only.
979
980
981 <!--------------------------------------------------------------->
982 <a name="ioerr_short_read"></a>
983 <h3>(522) SQLITE_IOERR_SHORT_READ</h3>
984 <p>
985 The SQLITE_IOERR_SHORT_READ error code is an <a href="rescode.html#pve">extended error code</a>
986 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating that a read attempt in the <a href="vfs.html">VFS</a> layer
987 was unable to obtain as many bytes as was requested. This might be
988 due to a truncated file.
989
990
991 <!--------------------------------------------------------------->
992 <a name="corrupt_sequence"></a>
993 <h3>(523) SQLITE_CORRUPT_SEQUENCE</h3>
994 <p>
995 The SQLITE_CORRUPT_SEQUENCE result code means that the schema of
996 the sqlite_sequence table is corrupt. The sqlite_sequence table
997 is used to help implement the <a href="autoinc.html">AUTOINCREMENT</a> feature. The
998 sqlite_sequence table should have the following format:
999 <blockquote><pre>
1000 CREATE TABLE sqlite_sequence(name,seq);
1001 </pre></blockquote>
1002 <p>If SQLite discovers that the sqlite_sequence table has any other
1003 format, it returns the SQLITE_CORRUPT_SEQUENCE error.
1004
1005
1006 <!--------------------------------------------------------------->
1007 <a name="cantopen_isdir"></a>
1008 <h3>(526) SQLITE_CANTOPEN_ISDIR</h3>
1009 <p>
1010 The SQLITE_CANTOPEN_ISDIR error code is an <a href="rescode.html#pve">extended error code</a>
1011 for <a href="rescode.html#cantopen">SQLITE_CANTOPEN</a> indicating that a file open operation failed because
1012 the file is really a directory.
1013
1014
1015 <!--------------------------------------------------------------->
1016 <a name="constraint_commithook"></a>
1017 <h3>(531) SQLITE_CONSTRAINT_COMMITHOOK</h3>
1018 <p>
1019 The SQLITE_CONSTRAINT_COMMITHOOK error code
1020 is an <a href="rescode.html#pve">extended error code</a>
1021 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a
1022 <a href="c3ref/commit_hook.html">commit hook callback</a> returned non-zero that thus
1023 caused the SQL statement to be rolled back.
1024
1025
1026 <!--------------------------------------------------------------->
1027 <a name="notice_recover_rollback"></a>
1028 <h3>(539) SQLITE_NOTICE_RECOVER_ROLLBACK</h3>
1029 <p>
1030 The SQLITE_NOTICE_RECOVER_ROLLBACK result code is
1031 passed to the callback of
1032 <a href="c3ref/log.html">sqlite3_log()</a> when a <a href="fileformat2.html#hotjrnl">hot journal</a> is rolled back.
1033
1034
1035 <!--------------------------------------------------------------->
1036 <a name="error_snapshot"></a>
1037 <h3>(769) SQLITE_ERROR_SNAPSHOT</h3>
1038 <p>
1039 The SQLITE_ERROR_SNAPSHOT result code might be returned when attempting
1040 to start a read transaction on an historical version of the database
1041 by using the <a href="c3ref/snapshot_open.html">sqlite3_snapshot_open()</a> interface. If the historical
1042 snapshot is no longer available, then the read transaction will fail
1043 with the SQLITE_ERROR_SNAPSHOT. This error code is only possible if
1044 SQLite is compiled with <a href="compile.html#enable_snapshot">-DSQLITE_ENABLE_SNAPSHOT</a>.
1045
1046
1047 <!--------------------------------------------------------------->
1048 <a name="busy_timeout"></a>
1049 <h3>(773) SQLITE_BUSY_TIMEOUT</h3>
1050 <p>
1051 The SQLITE_BUSY_TIMEOUT error code indicates that a blocking Posix
1052 advisory file lock request in the VFS layer failed due to a timeout.
1053 Blocking Posix advisory locks are only
1054 available as a proprietary SQLite extension and even then are only
1055 supported if SQLite is compiled with the SQLITE_EANBLE_SETLK_TIMEOUT
1056 compile-time option.
1057
1058
1059 <!--------------------------------------------------------------->
1060 <a name="readonly_rollback"></a>
1061 <h3>(776) SQLITE_READONLY_ROLLBACK</h3>
1062 <p>
1063 The SQLITE_READONLY_ROLLBACK error code is an <a href="rescode.html#pve">extended error code</a>
1064 for <a href="rescode.html#readonly">SQLITE_READONLY</a>. The SQLITE_READONLY_ROLLBACK error code indicates
1065 that a database cannot be opened because it has a <a href="fileformat2.html#hotjrnl">hot journal</a> that
1066 needs to be rolled back but cannot because the database is readonly.
1067
1068
1069 <!--------------------------------------------------------------->
1070 <a name="ioerr_write"></a>
1071 <h3>(778) SQLITE_IOERR_WRITE</h3>
1072 <p>
1073 The SQLITE_IOERR_WRITE error code is an <a href="rescode.html#pve">extended error code</a>
1074 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
1075 while trying to write into a file on disk. This error might result
1076 from a hardware malfunction or because a filesystem came unmounted
1077 while the file was open. This error should not occur if the filesystem
1078 is full as there is a separate error code (SQLITE_FULL) for that purpose.
1079
1080
1081 <!--------------------------------------------------------------->
1082 <a name="corrupt_index"></a>
1083 <h3>(779) SQLITE_CORRUPT_INDEX</h3>
1084 <p>
1085 The SQLITE_CORRUPT_INDEX result code means that SQLite detected
1086 an entry is or was missing from an index. This is a special case of
1087 the <a href="rescode.html#corrupt">SQLITE_CORRUPT</a> error code that suggests that the problem might
1088 be resolved by running the <a href="lang_reindex.html">REINDEX</a> command, assuming no other
1089 problems exist elsewhere in the database file.
1090
1091
1092 <!--------------------------------------------------------------->
1093 <a name="cantopen_fullpath"></a>
1094 <h3>(782) SQLITE_CANTOPEN_FULLPATH</h3>
1095 <p>
1096 The SQLITE_CANTOPEN_FULLPATH error code is an <a href="rescode.html#pve">extended error code</a>
1097 for <a href="rescode.html#cantopen">SQLITE_CANTOPEN</a> indicating that a file open operation failed because
1098 the operating system was unable to convert the filename into a full pathname.
1099
1100
1101 <!--------------------------------------------------------------->
1102 <a name="constraint_foreignkey"></a>
1103 <h3>(787) SQLITE_CONSTRAINT_FOREIGNKEY</h3>
1104 <p>
1105 The SQLITE_CONSTRAINT_FOREIGNKEY error code
1106 is an <a href="rescode.html#pve">extended error code</a>
1107 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="foreignkeys.html">foreign key constraint</a> failed.
1108
1109
1110 <!--------------------------------------------------------------->
1111 <a name="readonly_dbmoved"></a>
1112 <h3>(1032) SQLITE_READONLY_DBMOVED</h3>
1113 <p>
1114 The SQLITE_READONLY_DBMOVED error code is an <a href="rescode.html#pve">extended error code</a>
1115 for <a href="rescode.html#readonly">SQLITE_READONLY</a>. The SQLITE_READONLY_DBMOVED error code indicates
1116 that a database cannot be modified because the database file has been
1117 moved since it was opened, and so any attempt to modify the database
1118 might result in database corruption if the processes crashes because the
1119 <a href="lockingv3.html#rollback">rollback journal</a> would not be correctly named.
1120
1121
1122 <!--------------------------------------------------------------->
1123 <a name="ioerr_fsync"></a>
1124 <h3>(1034) SQLITE_IOERR_FSYNC</h3>
1125 <p>
1126 The SQLITE_IOERR_FSYNC error code is an <a href="rescode.html#pve">extended error code</a>
1127 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
1128 while trying to flush previously written content out of OS and/or
1129 disk-control buffers and into persistent storage. In other words,
1130 this code indicates a problem with the fsync() system call in unix
1131 or the FlushFileBuffers() system call in windows.
1132
1133
1134 <!--------------------------------------------------------------->
1135 <a name="cantopen_convpath"></a>
1136 <h3>(1038) SQLITE_CANTOPEN_CONVPATH</h3>
1137 <p>
1138 The SQLITE_CANTOPEN_CONVPATH error code is an <a href="rescode.html#pve">extended error code</a>
1139 for <a href="rescode.html#cantopen">SQLITE_CANTOPEN</a> used only by Cygwin <a href="vfs.html">VFS</a> and indicating that
1140 the cygwin_conv_path() system call failed while trying to open a file.
1141 See also: <a href="rescode.html#ioerr_convpath">SQLITE_IOERR_CONVPATH</a>
1142
1143
1144 <!--------------------------------------------------------------->
1145 <a name="constraint_function"></a>
1146 <h3>(1043) SQLITE_CONSTRAINT_FUNCTION</h3>
1147 <p>
1148 The SQLITE_CONSTRAINT_FUNCTION error code is not currently used
1149 by the SQLite core. However, this error code is available for use
1150 by extension functions.
1151
1152
1153 <!--------------------------------------------------------------->
1154 <a name="readonly_cantinit"></a>
1155 <h3>(1288) SQLITE_READONLY_CANTINIT</h3>
1156 <p>
1157 The SQLITE_READONLY_CANTINIT result code originates in the xShmMap method
1158 of a <a href="vfs.html">VFS</a> to indicate that the shared memory region used by <a href="wal.html">WAL mode</a>
1159 exists buts its content is unreliable and unusable by the current process
1160 since the current process does not have write permission on the shared
1161 memory region. (The shared memory region for WAL mode is normally a
1162 file with a "-wal" suffix that is mmapped into the process space. If
1163 the current process does not have write permission on that file, then it
1164 cannot write into shared memory.)
1165 <p>
1166 Higher level logic within SQLite will normally intercept the error code
1167 and create a temporary in-memory shared memory region so that the current
1168 process can at least read the content of the database. This result code
1169 should not reach the application interface layer.
1170
1171
1172 <!--------------------------------------------------------------->
1173 <a name="ioerr_dir_fsync"></a>
1174 <h3>(1290) SQLITE_IOERR_DIR_FSYNC</h3>
1175 <p>
1176 The SQLITE_IOERR_DIR_FSYNC error code is an <a href="rescode.html#pve">extended error code</a>
1177 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
1178 while trying to invoke fsync() on a directory. The unix <a href="vfs.html">VFS</a> attempts
1179 to fsync() directories after creating or deleting certain files to
1180 ensure that those files will still appear in the filesystem following
1181 a power loss or system crash. This error code indicates a problem
1182 attempting to perform that fsync().
1183
1184
1185 <!--------------------------------------------------------------->
1186 <a name="cantopen_dirtywal"></a>
1187 <h3>(1294) SQLITE_CANTOPEN_DIRTYWAL</h3>
1188 <p>
1189 The SQLITE_CANTOPEN_DIRTYWAL result code is not used at this time.
1190
1191
1192 <!--------------------------------------------------------------->
1193 <a name="constraint_notnull"></a>
1194 <h3>(1299) SQLITE_CONSTRAINT_NOTNULL</h3>
1195 <p>
1196 The SQLITE_CONSTRAINT_NOTNULL error code
1197 is an <a href="rescode.html#pve">extended error code</a>
1198 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtable.html#notnullconst">NOT NULL constraint</a> failed.
1199
1200
1201 <!--------------------------------------------------------------->
1202 <a name="readonly_directory"></a>
1203 <h3>(1544) SQLITE_READONLY_DIRECTORY</h3>
1204 <p>
1205 The SQLITE_READONLY_DIRECTORY result code indicates that the database
1206 is read-only because process does not have permission to create
1207 a journal file in the same directory as the database and the creation of
1208 a journal file is a prerequisite for writing.
1209
1210
1211 <!--------------------------------------------------------------->
1212 <a name="ioerr_truncate"></a>
1213 <h3>(1546) SQLITE_IOERR_TRUNCATE</h3>
1214 <p>
1215 The SQLITE_IOERR_TRUNCATE error code is an <a href="rescode.html#pve">extended error code</a>
1216 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
1217 while trying to truncate a file to a smaller size.
1218
1219
1220 <!--------------------------------------------------------------->
1221 <a name="cantopen_symlink"></a>
1222 <h3>(1550) SQLITE_CANTOPEN_SYMLINK</h3>
1223 <p>
1224 The SQLITE_CANTOPEN_SYMLINK result code is returned by the
1225 <a href="c3ref/open.html">sqlite3_open()</a> interface and its siblings when the
1226 <a href="c3ref/c_open_autoproxy.html">SQLITE_OPEN_NOFOLLOW</a> flag is used and the database file is
1227 a symbolic link.
1228
1229
1230 <!--------------------------------------------------------------->
1231 <a name="constraint_primarykey"></a>
1232 <h3>(1555) SQLITE_CONSTRAINT_PRIMARYKEY</h3>
1233 <p>
1234 The SQLITE_CONSTRAINT_PRIMARYKEY error code
1235 is an <a href="rescode.html#pve">extended error code</a>
1236 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtable.html#primkeyconst">PRIMARY KEY constraint</a> failed.
1237
1238
1239 <!--------------------------------------------------------------->
1240 <a name="ioerr_fstat"></a>
1241 <h3>(1802) SQLITE_IOERR_FSTAT</h3>
1242 <p>
1243 The SQLITE_IOERR_FSTAT error code is an <a href="rescode.html#pve">extended error code</a>
1244 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the <a href="vfs.html">VFS</a> layer
1245 while trying to invoke fstat() (or the equivalent) on a file in order
1246 to determine information such as the file size or access permissions.
1247
1248
1249 <!--------------------------------------------------------------->
1250 <a name="constraint_trigger"></a>
1251 <h3>(1811) SQLITE_CONSTRAINT_TRIGGER</h3>
1252 <p>
1253 The SQLITE_CONSTRAINT_TRIGGER error code
1254 is an <a href="rescode.html#pve">extended error code</a>
1255 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtrigger.html#raise">RAISE function</a> within
1256 a <a href="lang_createtrigger.html">trigger</a> fired, causing the SQL statement to abort.
1257
1258
1259 <!--------------------------------------------------------------->
1260 <a name="ioerr_unlock"></a>
1261 <h3>(2058) SQLITE_IOERR_UNLOCK</h3>
1262 <p>
1263 The SQLITE_IOERR_UNLOCK error code is an <a href="rescode.html#pve">extended error code</a>
1264 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1265 within xUnlock method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object.
1266
1267
1268 <!--------------------------------------------------------------->
1269 <a name="constraint_unique"></a>
1270 <h3>(2067) SQLITE_CONSTRAINT_UNIQUE</h3>
1271 <p>
1272 The SQLITE_CONSTRAINT_UNIQUE error code
1273 is an <a href="rescode.html#pve">extended error code</a>
1274 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtable.html#uniqueconst">UNIQUE constraint</a> failed.
1275
1276
1277 <!--------------------------------------------------------------->
1278 <a name="ioerr_rdlock"></a>
1279 <h3>(2314) SQLITE_IOERR_RDLOCK</h3>
1280 <p>
1281 The SQLITE_IOERR_RDLOCK error code is an <a href="rescode.html#pve">extended error code</a>
1282 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1283 within xLock method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object while trying
1284 to obtain a read lock.
1285
1286
1287 <!--------------------------------------------------------------->
1288 <a name="constraint_vtab"></a>
1289 <h3>(2323) SQLITE_CONSTRAINT_VTAB</h3>
1290 <p>
1291 The SQLITE_CONSTRAINT_VTAB error code is not currently used
1292 by the SQLite core. However, this error code is available for use
1293 by application-defined <a href="vtab.html">virtual tables</a>.
1294
1295
1296 <!--------------------------------------------------------------->
1297 <a name="ioerr_delete"></a>
1298 <h3>(2570) SQLITE_IOERR_DELETE</h3>
1299 <p>
1300 The SQLITE_IOERR_DELETE error code is an <a href="rescode.html#pve">extended error code</a>
1301 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1302 within xDelete method on the <a href="c3ref/vfs.html">sqlite3_vfs</a> object.
1303
1304
1305 <!--------------------------------------------------------------->
1306 <a name="constraint_rowid"></a>
1307 <h3>(2579) SQLITE_CONSTRAINT_ROWID</h3>
1308 <p>
1309 The SQLITE_CONSTRAINT_ROWID error code
1310 is an <a href="rescode.html#pve">extended error code</a>
1311 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that a <a href="lang_createtable.html#rowid">rowid</a> is not unique.
1312
1313
1314 <!--------------------------------------------------------------->
1315 <a name="ioerr_blocked"></a>
1316 <h3>(2826) SQLITE_IOERR_BLOCKED</h3>
1317 <p>
1318 The SQLITE_IOERR_BLOCKED error code is no longer used.
1319
1320
1321 <!--------------------------------------------------------------->
1322 <a name="constraint_pinned"></a>
1323 <h3>(2835) SQLITE_CONSTRAINT_PINNED</h3>
1324 <p>
1325 The SQLITE_CONSTRAINT_PINNED error code
1326 is an <a href="rescode.html#pve">extended error code</a>
1327 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that an <a href="lang_createtrigger.html">UPDATE trigger</a> attempted
1328 do delete the row that was being updated in the middle of the update.
1329
1330
1331 <!--------------------------------------------------------------->
1332 <a name="ioerr_nomem"></a>
1333 <h3>(3082) SQLITE_IOERR_NOMEM</h3>
1334 <p>
1335 The SQLITE_IOERR_NOMEM error code is sometimes returned by the <a href="vfs.html">VFS</a>
1336 layer to indicate that an operation could not be completed due to the
1337 inability to allocate sufficient memory. This error code is normally
1338 converted into <a href="rescode.html#nomem">SQLITE_NOMEM</a> by the higher layers of SQLite before
1339 being returned to the application.
1340
1341
1342 <!--------------------------------------------------------------->
1343 <a name="constraint_datatype"></a>
1344 <h3>(3091) SQLITE_CONSTRAINT_DATATYPE</h3>
1345 <p>
1346 The SQLITE_CONSTRAINT_DATATYPE error code
1347 is an <a href="rescode.html#pve">extended error code</a>
1348 for <a href="rescode.html#constraint">SQLITE_CONSTRAINT</a> indicating that an insert or update attempted
1349 to store a value inconsistent with the column's declared type
1350 in a table defined as STRICT.
1351
1352
1353 <!--------------------------------------------------------------->
1354 <a name="ioerr_access"></a>
1355 <h3>(3338) SQLITE_IOERR_ACCESS</h3>
1356 <p>
1357 The SQLITE_IOERR_ACCESS error code is an <a href="rescode.html#pve">extended error code</a>
1358 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1359 within the xAccess method on the <a href="c3ref/vfs.html">sqlite3_vfs</a> object.
1360
1361
1362 <!--------------------------------------------------------------->
1363 <a name="ioerr_checkreservedlock"></a>
1364 <h3>(3594) SQLITE_IOERR_CHECKRESERVEDLOCK</h3>
1365 <p>
1366 The SQLITE_IOERR_CHECKRESERVEDLOCK error code is
1367 an <a href="rescode.html#pve">extended error code</a>
1368 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1369 within the xCheckReservedLock method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object.
1370
1371
1372 <!--------------------------------------------------------------->
1373 <a name="ioerr_lock"></a>
1374 <h3>(3850) SQLITE_IOERR_LOCK</h3>
1375 <p>
1376 The SQLITE_IOERR_LOCK error code is an <a href="rescode.html#pve">extended error code</a>
1377 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error in the
1378 advisory file locking logic.
1379 Usually an SQLITE_IOERR_LOCK error indicates a problem obtaining
1380 a <a href="lockingv3.html#pending_lock">PENDING lock</a>. However it can also indicate miscellaneous
1381 locking errors on some of the specialized <a href="vfs.html">VFSes</a> used on Macs.
1382
1383
1384 <!--------------------------------------------------------------->
1385 <a name="ioerr_close"></a>
1386 <h3>(4106) SQLITE_IOERR_CLOSE</h3>
1387 <p>
1388 The SQLITE_IOERR_CLOSE error code is an <a href="rescode.html#pve">extended error code</a>
1389 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1390 within the xClose method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object.
1391
1392
1393 <!--------------------------------------------------------------->
1394 <a name="ioerr_dir_close"></a>
1395 <h3>(4362) SQLITE_IOERR_DIR_CLOSE</h3>
1396 <p>
1397 The SQLITE_IOERR_DIR_CLOSE error code is no longer used.
1398
1399
1400 <!--------------------------------------------------------------->
1401 <a name="ioerr_shmopen"></a>
1402 <h3>(4618) SQLITE_IOERR_SHMOPEN</h3>
1403 <p>
1404 The SQLITE_IOERR_SHMOPEN error code is an <a href="rescode.html#pve">extended error code</a>
1405 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1406 within the xShmMap method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object
1407 while trying to open a new shared memory segment.
1408
1409
1410 <!--------------------------------------------------------------->
1411 <a name="ioerr_shmsize"></a>
1412 <h3>(4874) SQLITE_IOERR_SHMSIZE</h3>
1413 <p>
1414 The SQLITE_IOERR_SHMSIZE error code is an <a href="rescode.html#pve">extended error code</a>
1415 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1416 within the xShmMap method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object
1417 while trying to enlarge a <a href="walformat.html#shm">"shm" file</a> as part of
1418 <a href="wal.html">WAL mode</a> transaction processing. This error may indicate that
1419 the underlying filesystem volume is out of space.
1420
1421
1422 <!--------------------------------------------------------------->
1423 <a name="ioerr_shmlock"></a>
1424 <h3>(5130) SQLITE_IOERR_SHMLOCK</h3>
1425 <p>
1426 The SQLITE_IOERR_SHMLOCK error code is no longer used.
1427
1428
1429 <!--------------------------------------------------------------->
1430 <a name="ioerr_shmmap"></a>
1431 <h3>(5386) SQLITE_IOERR_SHMMAP</h3>
1432 <p>
1433 The SQLITE_IOERR_SHMMAP error code is an <a href="rescode.html#pve">extended error code</a>
1434 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1435 within the xShmMap method on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object
1436 while trying to map a shared memory segment into the process address space.
1437
1438
1439 <!--------------------------------------------------------------->
1440 <a name="ioerr_seek"></a>
1441 <h3>(5642) SQLITE_IOERR_SEEK</h3>
1442 <p>
1443 The SQLITE_IOERR_SEEK error code is an <a href="rescode.html#pve">extended error code</a>
1444 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1445 within the xRead or xWrite methods on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object
1446 while trying to seek a file descriptor to the beginning point of the
1447 file where the read or write is to occur.
1448
1449
1450 <!--------------------------------------------------------------->
1451 <a name="ioerr_delete_noent"></a>
1452 <h3>(5898) SQLITE_IOERR_DELETE_NOENT</h3>
1453 <p>
1454 The SQLITE_IOERR_DELETE_NOENT error code
1455 is an <a href="rescode.html#pve">extended error code</a>
1456 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating that the
1457 xDelete method on the <a href="c3ref/vfs.html">sqlite3_vfs</a> object failed because the
1458 file being deleted does not exist.
1459
1460
1461 <!--------------------------------------------------------------->
1462 <a name="ioerr_mmap"></a>
1463 <h3>(6154) SQLITE_IOERR_MMAP</h3>
1464 <p>
1465 The SQLITE_IOERR_MMAP error code is an <a href="rescode.html#pve">extended error code</a>
1466 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating an I/O error
1467 within the xFetch or xUnfetch methods on the <a href="c3ref/io_methods.html">sqlite3_io_methods</a> object
1468 while trying to map or unmap part of the database file into the
1469 process address space.
1470
1471
1472 <!--------------------------------------------------------------->
1473 <a name="ioerr_gettemppath"></a>
1474 <h3>(6410) SQLITE_IOERR_GETTEMPPATH</h3>
1475 <p>
1476 The SQLITE_IOERR_GETTEMPPATH error code is an <a href="rescode.html#pve">extended error code</a>
1477 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> indicating that the <a href="vfs.html">VFS</a> is unable to determine
1478 a suitable directory in which to place temporary files.
1479
1480
1481 <!--------------------------------------------------------------->
1482 <a name="ioerr_convpath"></a>
1483 <h3>(6666) SQLITE_IOERR_CONVPATH</h3>
1484 <p>
1485 The SQLITE_IOERR_CONVPATH error code is an <a href="rescode.html#pve">extended error code</a>
1486 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> used only by Cygwin <a href="vfs.html">VFS</a> and indicating that
1487 the cygwin_conv_path() system call failed.
1488 See also: <a href="rescode.html#cantopen_convpath">SQLITE_CANTOPEN_CONVPATH</a>
1489
1490
1491 <!--------------------------------------------------------------->
1492 <a name="ioerr_vnode"></a>
1493 <h3>(6922) SQLITE_IOERR_VNODE</h3>
1494 <p>
1495 The SQLITE_IOERR_VNODE error code is a code reserved for use
1496 by extensions. It is not used by the SQLite core.
1497
1498
1499 <!--------------------------------------------------------------->
1500 <a name="ioerr_auth"></a>
1501 <h3>(7178) SQLITE_IOERR_AUTH</h3>
1502 <p>
1503 The SQLITE_IOERR_AUTH error code is a code reserved for use
1504 by extensions. It is not used by the SQLite core.
1505
1506
1507 <!--------------------------------------------------------------->
1508 <a name="ioerr_begin_atomic"></a>
1509 <h3>(7434) SQLITE_IOERR_BEGIN_ATOMIC</h3>
1510 <p>
1511 The SQLITE_IOERR_BEGIN_ATOMIC error code indicates that the
1512 underlying operating system reported and error on the
1513 <a href="c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlbeginatomicwrite">SQLITE_FCNTL_BEGIN_ATOMIC_WRITE</a> file-control. This only comes
1514 up when <a href="compile.html#enable_atomic_write">SQLITE_ENABLE_ATOMIC_WRITE</a> is enabled and the database
1515 is hosted on a filesystem that supports atomic writes.
1516
1517
1518 <!--------------------------------------------------------------->
1519 <a name="ioerr_commit_atomic"></a>
1520 <h3>(7690) SQLITE_IOERR_COMMIT_ATOMIC</h3>
1521 <p>
1522 The SQLITE_IOERR_COMMIT_ATOMIC error code indicates that the
1523 underlying operating system reported and error on the
1524 <a href="c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlcommitatomicwrite">SQLITE_FCNTL_COMMIT_ATOMIC_WRITE</a> file-control. This only comes
1525 up when <a href="compile.html#enable_atomic_write">SQLITE_ENABLE_ATOMIC_WRITE</a> is enabled and the database
1526 is hosted on a filesystem that supports atomic writes.
1527
1528
1529 <!--------------------------------------------------------------->
1530 <a name="ioerr_rollback_atomic"></a>
1531 <h3>(7946) SQLITE_IOERR_ROLLBACK_ATOMIC</h3>
1532 <p>
1533 The SQLITE_IOERR_ROLLBACK_ATOMIC error code indicates that the
1534 underlying operating system reported and error on the
1535 <a href="c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlrollbackatomicwrite">SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE</a> file-control. This only comes
1536 up when <a href="compile.html#enable_atomic_write">SQLITE_ENABLE_ATOMIC_WRITE</a> is enabled and the database
1537 is hosted on a filesystem that supports atomic writes.
1538
1539
1540 <!--------------------------------------------------------------->
1541 <a name="ioerr_data"></a>
1542 <h3>(8202) SQLITE_IOERR_DATA</h3>
1543 <p>
1544 The SQLITE_IOERR_DATA error code is an <a href="rescode.html#pve">extended error code</a>
1545 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> used only by <a href="cksumvfs.html">checksum VFS shim</a> to indicate that
1546 the checksum on a page of the database file is incorrect.
1547
1548
1549 <!--------------------------------------------------------------->
1550 <a name="ioerr_corruptfs"></a>
1551 <h3>(8458) SQLITE_IOERR_CORRUPTFS</h3>
1552 <p>
1553 The SQLITE_IOERR_CORRUPTFS error code is an <a href="rescode.html#pve">extended error code</a>
1554 for <a href="rescode.html#ioerr">SQLITE_IOERR</a> used only by a VFS to indicate that a seek or read
1555 failure was due to the request not falling within the file's boundary
1556 rather than an ordinary device failure. This often indicates a
1557 corrupt filesystem.
1558
1559
1560
1561 </p><p align="center"><small><i>This page last modified on <a href="https://sqlite.org/docsrc/honeypot" id="mtimelink" data-href="https://sqlite.org/docsrc/finfo/pages/rescode.in?m=a100f5b2dc">2024-08-10 18:17:30</a> UTC </small></i></p>
1562