1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
<!DOCTYPE html>
<html><head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="../sqlite.css" rel="stylesheet">
<title>Database Connection Handle</title>
<!-- path=../ -->
</head>
<body>
<div class=nosearch>
<a href="../index.html">
<img class="logo" src="../images/sqlite370_banner.gif" alt="SQLite" border="0">
</a>
<div><!-- IE hack to prevent disappearing logo --></div>
<div class="tagline desktoponly">
Small. Fast. Reliable.<br>Choose any three.
</div>
<div class="menu mainmenu">
<ul>
<li><a href="../index.html">Home</a>
<li class='mobileonly'><a href="javascript:void(0)" onclick='toggle_div("submenu")'>Menu</a>
<li class='wideonly'><a href='../about.html'>About</a>
<li class='desktoponly'><a href="../docs.html">Documentation</a>
<li class='desktoponly'><a href="../download.html">Download</a>
<li class='wideonly'><a href='../copyright.html'>License</a>
<li class='desktoponly'><a href="../support.html">Support</a>
<li class='desktoponly'><a href="../prosupport.html">Purchase</a>
<li class='search' id='search_menubutton'>
<a href="javascript:void(0)" onclick='toggle_search()'>Search</a>
</ul>
</div>
<div class="menu submenu" id="submenu">
<ul>
<li><a href='../about.html'>About</a>
<li><a href='../docs.html'>Documentation</a>
<li><a href='../download.html'>Download</a>
<li><a href='../support.html'>Support</a>
<li><a href='../prosupport.html'>Purchase</a>
</ul>
</div>
<div class="searchmenu" id="searchmenu">
<form method="GET" action="../search">
<select name="s" id="searchtype">
<option value="d">Search Documentation</option>
<option value="c">Search Changelog</option>
</select>
<input type="text" name="q" id="searchbox" value="">
<input type="submit" value="Go">
</form>
</div>
</div>
<script>
function toggle_div(nm) {
var w = document.getElementById(nm);
if( w.style.display=="block" ){
w.style.display = "none";
}else{
w.style.display = "block";
}
}
function toggle_search() {
var w = document.getElementById("searchmenu");
if( w.style.display=="block" ){
w.style.display = "none";
} else {
w.style.display = "block";
setTimeout(function(){
document.getElementById("searchbox").focus()
}, 30);
}
}
function div_off(nm){document.getElementById(nm).style.display="none";}
window.onbeforeunload = function(e){div_off("submenu");}
/* Disable the Search feature if we are not operating from CGI, since */
/* Search is accomplished using CGI and will not work without it. */
if( !location.origin || !location.origin.match || !location.origin.match(/http/) ){
document.getElementById("search_menubutton").style.display = "none";
}
/* Used by the Hide/Show button beside syntax diagrams, to toggle the */
function hideorshow(btn,obj){
var x = document.getElementById(obj);
var b = document.getElementById(btn);
if( x.style.display!='none' ){
x.style.display = 'none';
b.innerHTML='show';
}else{
x.style.display = '';
b.innerHTML='hide';
}
return false;
}
var antiRobot = 0;
function antiRobotGo(){
if( antiRobot!=3 ) return;
antiRobot = 7;
var j = document.getElementById("mtimelink");
if(j && j.hasAttribute("data-href")) j.href=j.getAttribute("data-href");
}
function antiRobotDefense(){
document.body.onmousedown=function(){
antiRobot |= 2;
antiRobotGo();
document.body.onmousedown=null;
}
document.body.onmousemove=function(){
antiRobot |= 2;
antiRobotGo();
document.body.onmousemove=null;
}
setTimeout(function(){
antiRobot |= 1;
antiRobotGo();
}, 100)
antiRobotGo();
}
antiRobotDefense();
</script>
<!-- keywords: {database connection} {database connections} sqlite3 -->
<div class=nosearch>
<a href="../c3ref/intro.html"><h2>SQLite C Interface</h2></a>
<h2>Database Connection Handle</h2>
</div>
<blockquote><pre>
typedef struct sqlite3 sqlite3;
</pre></blockquote>
<p>
Each open SQLite database is represented by a pointer to an instance of
the opaque structure named "sqlite3". It is useful to think of an sqlite3
pointer as an object. The <a href="../c3ref/open.html">sqlite3_open()</a>, <a href="../c3ref/open.html">sqlite3_open16()</a>, and
<a href="../c3ref/open.html">sqlite3_open_v2()</a> interfaces are its constructors, and <a href="../c3ref/close.html">sqlite3_close()</a>
and <a href="../c3ref/close.html">sqlite3_close_v2()</a> are its destructors. There are many other
interfaces (such as
<a href="../c3ref/prepare.html">sqlite3_prepare_v2()</a>, <a href="../c3ref/create_function.html">sqlite3_create_function()</a>, and
<a href="../c3ref/busy_timeout.html">sqlite3_busy_timeout()</a> to name but three) that are methods on an
sqlite3 object.
</p><p>3 Constructors using this object:
<a href="../c3ref/open.html">sqlite3_open()</a>,
<a href="../c3ref/open.html">sqlite3_open16()</a>,
<a href="../c3ref/open.html">sqlite3_open_v2()</a></p>
<p>2 Destructors using this object:
<a href="../c3ref/close.html">sqlite3_close()</a>,
<a href="../c3ref/close.html">sqlite3_close_v2()</a></p>
<p>79 Methods using this object:
<div class='columns' style='columns: 17em auto;'>
<ul style='padding-top:0;'>
<li><a href='../c3ref/autovacuum_pages.html'>sqlite3_autovacuum_pages</a></li>
<li><a href='../c3ref/blob_open.html'>sqlite3_blob_open</a></li>
<li><a href='../c3ref/busy_handler.html'>sqlite3_busy_handler</a></li>
<li><a href='../c3ref/busy_timeout.html'>sqlite3_busy_timeout</a></li>
<li><a href='../c3ref/changes.html'>sqlite3_changes</a></li>
<li><a href='../c3ref/changes.html'>sqlite3_changes64</a></li>
<li><a href='../c3ref/collation_needed.html'>sqlite3_collation_needed</a></li>
<li><a href='../c3ref/collation_needed.html'>sqlite3_collation_needed16</a></li>
<li><a href='../c3ref/commit_hook.html'>sqlite3_commit_hook</a></li>
<li><a href='../c3ref/create_collation.html'>sqlite3_create_collation</a></li>
<li><a href='../c3ref/create_collation.html'>sqlite3_create_collation16</a></li>
<li><a href='../c3ref/create_collation.html'>sqlite3_create_collation_v2</a></li>
<li><a href='../c3ref/create_function.html'>sqlite3_create_function</a></li>
<li><a href='../c3ref/create_function.html'>sqlite3_create_function16</a></li>
<li><a href='../c3ref/create_function.html'>sqlite3_create_function_v2</a></li>
<li><a href='../c3ref/create_module.html'>sqlite3_create_module</a></li>
<li><a href='../c3ref/create_module.html'>sqlite3_create_module_v2</a></li>
<li><a href='../c3ref/create_function.html'>sqlite3_create_window_function</a></li>
<li><a href='../c3ref/db_cacheflush.html'>sqlite3_db_cacheflush</a></li>
<li><a href='../c3ref/db_config.html'>sqlite3_db_config</a></li>
<li><a href='../c3ref/db_filename.html'>sqlite3_db_filename</a></li>
<li><a href='../c3ref/db_mutex.html'>sqlite3_db_mutex</a></li>
<li><a href='../c3ref/db_name.html'>sqlite3_db_name</a></li>
<li><a href='../c3ref/db_readonly.html'>sqlite3_db_readonly</a></li>
<li><a href='../c3ref/db_release_memory.html'>sqlite3_db_release_memory</a></li>
<li><a href='../c3ref/db_status.html'>sqlite3_db_status</a></li>
<li><a href='../c3ref/drop_modules.html'>sqlite3_drop_modules</a></li>
<li><a href='../c3ref/enable_load_extension.html'>sqlite3_enable_load_extension</a></li>
<li><a href='../c3ref/errcode.html'>sqlite3_errcode</a></li>
<li><a href='../c3ref/errcode.html'>sqlite3_errmsg</a></li>
<li><a href='../c3ref/errcode.html'>sqlite3_errmsg16</a></li>
<li><a href='../c3ref/errcode.html'>sqlite3_error_offset</a></li>
<li><a href='../c3ref/errcode.html'>sqlite3_errstr</a></li>
<li><a href='../c3ref/exec.html'>sqlite3_exec</a></li>
<li><a href='../c3ref/errcode.html'>sqlite3_extended_errcode</a></li>
<li><a href='../c3ref/extended_result_codes.html'>sqlite3_extended_result_codes</a></li>
<li><a href='../c3ref/file_control.html'>sqlite3_file_control</a></li>
<li><a href='../c3ref/free_table.html'>sqlite3_free_table</a></li>
<li><a href='../c3ref/get_autocommit.html'>sqlite3_get_autocommit</a></li>
<li><a href='../c3ref/get_clientdata.html'>sqlite3_get_clientdata</a></li>
<li><a href='../c3ref/free_table.html'>sqlite3_get_table</a></li>
<li><a href='../c3ref/interrupt.html'>sqlite3_interrupt</a></li>
<li><a href='../c3ref/interrupt.html'>sqlite3_is_interrupted</a></li>
<li><a href='../c3ref/last_insert_rowid.html'>sqlite3_last_insert_rowid</a></li>
<li><a href='../c3ref/limit.html'>sqlite3_limit</a></li>
<li><a href='../c3ref/load_extension.html'>sqlite3_load_extension</a></li>
<li><a href='../c3ref/next_stmt.html'>sqlite3_next_stmt</a></li>
<li><a href='../c3ref/overload_function.html'>sqlite3_overload_function</a></li>
<li><a href='../c3ref/prepare.html'>sqlite3_prepare</a></li>
<li><a href='../c3ref/prepare.html'>sqlite3_prepare16</a></li>
<li><a href='../c3ref/prepare.html'>sqlite3_prepare16_v2</a></li>
<li><a href='../c3ref/prepare.html'>sqlite3_prepare16_v3</a></li>
<li><a href='../c3ref/prepare.html'>sqlite3_prepare_v2</a></li>
<li><a href='../c3ref/prepare.html'>sqlite3_prepare_v3</a></li>
<li><a href='../c3ref/preupdate_blobwrite.html'>sqlite3_preupdate_blobwrite</a></li>
<li><a href='../c3ref/preupdate_blobwrite.html'>sqlite3_preupdate_count</a></li>
<li><a href='../c3ref/preupdate_blobwrite.html'>sqlite3_preupdate_depth</a></li>
<li><a href='../c3ref/preupdate_blobwrite.html'>sqlite3_preupdate_hook</a></li>
<li><a href='../c3ref/preupdate_blobwrite.html'>sqlite3_preupdate_new</a></li>
<li><a href='../c3ref/preupdate_blobwrite.html'>sqlite3_preupdate_old</a></li>
<li><a href='../c3ref/profile.html'>sqlite3_profile</a></li>
<li><a href='../c3ref/progress_handler.html'>sqlite3_progress_handler</a></li>
<li><a href='../c3ref/commit_hook.html'>sqlite3_rollback_hook</a></li>
<li><a href='../c3ref/set_authorizer.html'>sqlite3_set_authorizer</a></li>
<li><a href='../c3ref/get_clientdata.html'>sqlite3_set_clientdata</a></li>
<li><a href='../c3ref/set_last_insert_rowid.html'>sqlite3_set_last_insert_rowid</a></li>
<li><a href='../c3ref/system_errno.html'>sqlite3_system_errno</a></li>
<li><a href='../c3ref/table_column_metadata.html'>sqlite3_table_column_metadata</a></li>
<li><a href='../c3ref/total_changes.html'>sqlite3_total_changes</a></li>
<li><a href='../c3ref/total_changes.html'>sqlite3_total_changes64</a></li>
<li><a href='../c3ref/profile.html'>sqlite3_trace</a></li>
<li><a href='../c3ref/trace_v2.html'>sqlite3_trace_v2</a></li>
<li><a href='../c3ref/txn_state.html'>sqlite3_txn_state</a></li>
<li><a href='../c3ref/unlock_notify.html'>sqlite3_unlock_notify</a></li>
<li><a href='../c3ref/update_hook.html'>sqlite3_update_hook</a></li>
<li><a href='../c3ref/wal_autocheckpoint.html'>sqlite3_wal_autocheckpoint</a></li>
<li><a href='../c3ref/wal_checkpoint.html'>sqlite3_wal_checkpoint</a></li>
<li><a href='../c3ref/wal_checkpoint_v2.html'>sqlite3_wal_checkpoint_v2</a></li>
<li><a href='../c3ref/wal_hook.html'>sqlite3_wal_hook</a></li>
</ul>
</div>
</p>
<p>See also lists of
<a href="../c3ref/objlist.html">Objects</a>,
<a href="../c3ref/constlist.html">Constants</a>, and
<a href="../c3ref/funclist.html">Functions</a>.</p>
|