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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<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>
</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_div("searchmenu")'>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">
<span class="desktoponly">Search for:</span> <input type="text" name="q">
<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 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.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;
}
</script>
</div>
<!-- keywords: {database connection} {database connections} sqlite3 -->
<div class=nosearch>
<a href="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>Constructors:
<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>Destructors:
<a href="../c3ref/close.html">sqlite3_close()</a>,
<a href="../c3ref/close.html">sqlite3_close_v2()</a></p>
<style>
#listtab22 tr td {vertical-align:top;}
</style>
<table id='listtab22' width='100%'></table>
<script>
var listitems22 = [{"u":"../c3ref/blob_open.html","x":"sqlite3_blob_open","s":0},
{"u":"../c3ref/busy_handler.html","x":"sqlite3_busy_handler","s":0},
{"u":"../c3ref/busy_timeout.html","x":"sqlite3_busy_timeout","s":0},
{"u":"../c3ref/changes.html","x":"sqlite3_changes","s":0},
{"u":"../c3ref/collation_needed.html","x":"sqlite3_collation_needed","s":0},
{"u":"../c3ref/collation_needed.html","x":"sqlite3_collation_needed16","s":0},
{"u":"../c3ref/commit_hook.html","x":"sqlite3_commit_hook","s":0},
{"u":"../c3ref/create_collation.html","x":"sqlite3_create_collation","s":0},
{"u":"../c3ref/create_collation.html","x":"sqlite3_create_collation16","s":0},
{"u":"../c3ref/create_collation.html","x":"sqlite3_create_collation_v2","s":0},
{"u":"../c3ref/create_function.html","x":"sqlite3_create_function","s":0},
{"u":"../c3ref/create_function.html","x":"sqlite3_create_function16","s":0},
{"u":"../c3ref/create_function.html","x":"sqlite3_create_function_v2","s":0},
{"u":"../c3ref/create_module.html","x":"sqlite3_create_module","s":0},
{"u":"../c3ref/create_module.html","x":"sqlite3_create_module_v2","s":0},
{"u":"../c3ref/db_config.html","x":"sqlite3_db_config","s":0},
{"u":"../c3ref/db_filename.html","x":"sqlite3_db_filename","s":0},
{"u":"../c3ref/db_mutex.html","x":"sqlite3_db_mutex","s":0},
{"u":"../c3ref/db_readonly.html","x":"sqlite3_db_readonly","s":0},
{"u":"../c3ref/db_release_memory.html","x":"sqlite3_db_release_memory","s":0},
{"u":"../c3ref/db_status.html","x":"sqlite3_db_status","s":0},
{"u":"../c3ref/enable_load_extension.html","x":"sqlite3_enable_load_extension","s":0},
{"u":"../c3ref/errcode.html","x":"sqlite3_errcode","s":0},
{"u":"../c3ref/errcode.html","x":"sqlite3_errmsg","s":0},
{"u":"../c3ref/errcode.html","x":"sqlite3_errmsg16","s":0},
{"u":"../c3ref/errcode.html","x":"sqlite3_errstr","s":0},
{"u":"../c3ref/exec.html","x":"sqlite3_exec","s":0},
{"u":"../c3ref/errcode.html","x":"sqlite3_extended_errcode","s":0},
{"u":"../c3ref/extended_result_codes.html","x":"sqlite3_extended_result_codes","s":0},
{"u":"../c3ref/file_control.html","x":"sqlite3_file_control","s":0},
{"u":"../c3ref/free_table.html","x":"sqlite3_free_table","s":0},
{"u":"../c3ref/get_autocommit.html","x":"sqlite3_get_autocommit","s":0},
{"u":"../c3ref/free_table.html","x":"sqlite3_get_table","s":0},
{"u":"../c3ref/interrupt.html","x":"sqlite3_interrupt","s":0},
{"u":"../c3ref/last_insert_rowid.html","x":"sqlite3_last_insert_rowid","s":0},
{"u":"../c3ref/limit.html","x":"sqlite3_limit","s":0},
{"u":"../c3ref/load_extension.html","x":"sqlite3_load_extension","s":0},
{"u":"../c3ref/next_stmt.html","x":"sqlite3_next_stmt","s":0},
{"u":"../c3ref/overload_function.html","x":"sqlite3_overload_function","s":0},
{"u":"../c3ref/prepare.html","x":"sqlite3_prepare","s":0},
{"u":"../c3ref/prepare.html","x":"sqlite3_prepare16","s":0},
{"u":"../c3ref/prepare.html","x":"sqlite3_prepare16_v2","s":0},
{"u":"../c3ref/prepare.html","x":"sqlite3_prepare_v2","s":0},
{"u":"../c3ref/profile.html","x":"sqlite3_profile","s":0},
{"u":"../c3ref/progress_handler.html","x":"sqlite3_progress_handler","s":0},
{"u":"../c3ref/commit_hook.html","x":"sqlite3_rollback_hook","s":0},
{"u":"../c3ref/set_authorizer.html","x":"sqlite3_set_authorizer","s":0},
{"u":"../c3ref/table_column_metadata.html","x":"sqlite3_table_column_metadata","s":0},
{"u":"../c3ref/total_changes.html","x":"sqlite3_total_changes","s":0},
{"u":"../c3ref/profile.html","x":"sqlite3_trace","s":0},
{"u":"../c3ref/trace_v2.html","x":"sqlite3_trace_v2","s":0},
{"u":"../c3ref/unlock_notify.html","x":"sqlite3_unlock_notify","s":0},
{"u":"../c3ref/update_hook.html","x":"sqlite3_update_hook","s":0},
{"u":"../c3ref/wal_autocheckpoint.html","x":"sqlite3_wal_autocheckpoint","s":0},
{"u":"../c3ref/wal_checkpoint.html","x":"sqlite3_wal_checkpoint","s":0},
{"u":"../c3ref/wal_checkpoint_v2.html","x":"sqlite3_wal_checkpoint_v2","s":0},
{"u":"../c3ref/wal_hook.html","x":"sqlite3_wal_hook","s":0}];
var j = 0;
var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var nCol = Math.floor(w/350);
if(nCol<=0) nCol=1;
var nRow = Math.ceil((listitems22.length+1)/nCol);
var h="<tr><td colspan="+nCol;
h += ">Methods:</td></tr><tr><td><ul class='multicol_list'>"
var ea
for(var i=0; i<listitems22.length; i++){
if( (++j)>nRow ){
h += "</ul></td>\n<td><ul class='multicol_list'>\n";
j = 1;
}
if(listitems22[i].u=="" || listitems22[i].s==2){
h += "<li>"
ea = ""
}else{
h += "<li><a href='";
h += listitems22[i].u;
h += "'>";
ea = "</a>"
}
if(listitems22[i].s==2 || listitems22[i].s==3) h += "<s>"
h += listitems22[i].x;
if(listitems22[i].s==2 || listitems22[i].s==3) h += "</s>"
h += ea
if(listitems22[i].s==1) h += "<small><i>(exp)</i></small>\n";
if(listitems22[i].s==3) h += "¹\n";
if(listitems22[i].s==4) h += "²\n";
if(listitems22[i].s==5) h += "³\n";
}
document.getElementById("listtab22").innerHTML = h;
</script>
</p>
<p>See also lists of
<a href="objlist.html">Objects</a>,
<a href="constlist.html">Constants</a>, and
<a href="funclist.html">Functions</a>.</p>
|