forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
40 lines
5.2 KiB
HTML
40 lines
5.2 KiB
HTML
<a name="EN-US_TOPIC_0000001188323748"></a><a name="EN-US_TOPIC_0000001188323748"></a>
|
|
|
|
<h1 class="topictitle1">SQLDisconnect</h1>
|
|
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001188323748__sb09a895694164f21ad0ff41c58c5636c"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001188323748__afb1aceb1298a4c5397d547ac4821391b"><strong id="EN-US_TOPIC_0000001188323748__b842352706142410">SQLDisconnect</strong> closes the connection associated with the database connection handle.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188323748__sa59d850f18584386b71352a3ad1aa346"><h4 class="sectiontitle">Prototype</h4><div class="codecoloring" codetype="Cpp" id="EN-US_TOPIC_0000001188323748__s33b5bdd526e945df9e35d86c31e9c466"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">SQLRETURN</span><span class="w"> </span><span class="nf">SQLDisconnect</span><span class="p">(</span><span class="n">SQLHDBC</span><span class="w"> </span><span class="n">ConnectionHandle</span><span class="p">);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188323748__sd728723fbca34191a055a29407ecbd41"><h4 class="sectiontitle">Parameter</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001188323748__te74d70591685406086e00c4ce1f71858" frame="border" border="1" rules="all"><caption><b>Table 1 </b>SQLDisconnect parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001188323748__rc27711a1dd3b45b4b0a7cd65ed4648e7"><th align="left" class="cellrowborder" valign="top" width="24.5%" id="mcps1.3.3.2.2.3.1.1"><p id="EN-US_TOPIC_0000001188323748__a80e379abd48d43008e1cbc167b9fd562">Keyword</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="75.5%" id="mcps1.3.3.2.2.3.1.2"><p id="EN-US_TOPIC_0000001188323748__a610a82d3ff6e4cb49cabecb642d24517">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001188323748__r833b638da93c40d1a252bb6825cae837"><td class="cellrowborder" valign="top" width="24.5%" headers="mcps1.3.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001188323748__a234fe1dbaecb4cd9a41a35dbbcdcb1cc">ConnectionHandle</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="75.5%" headers="mcps1.3.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001188323748__aea991fa486014efebe92af017f732518">Connection handle, obtained from <strong id="EN-US_TOPIC_0000001188323748__b842352706142454">SQLAllocHandle</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188323748__s9199cb20b4804b698977d9446c465454"><h4 class="sectiontitle">Return Values</h4><ul id="EN-US_TOPIC_0000001188323748__u84cec6c2e8124a91b724e3e02c8ddced"><li id="EN-US_TOPIC_0000001188323748__l968cb5b8bdc84da5bcedb385759c0fa5"><strong id="EN-US_TOPIC_0000001188323748__b842352706112950">SQL_SUCCESS</strong> indicates that the call succeeded.</li><li id="EN-US_TOPIC_0000001188323748__l3fe243d0b6664b228d3c4f47773be16f"><strong id="EN-US_TOPIC_0000001188323748__b842352706112952">SQL_SUCCESS_WITH_INFO</strong> indicates some warning information is displayed.</li><li id="EN-US_TOPIC_0000001188323748__l8f28cf69ad7b4facb16b7c7724d3bfa8"><strong id="EN-US_TOPIC_0000001188323748__b842352706112954">SQL_ERROR</strong> indicates major errors, such as memory allocation and connection failures.</li><li id="EN-US_TOPIC_0000001188323748__l40792185d564454ab2006ed23a01cd4c"><strong id="EN-US_TOPIC_0000001188323748__b842352706112956">SQL_INVALID_HANDLE</strong> indicates that invalid handles were called. Values returned by other APIs are similar to the preceding values.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188323748__s34c829048f9241a0b08c3de513bacafc"><h4 class="sectiontitle">Precautions</h4><p id="EN-US_TOPIC_0000001188323748__a75147c98fc16402cbc785649e4a6d309">If <strong id="EN-US_TOPIC_0000001188323748__b5838997161752">SQLDisconnect</strong> returns <strong id="EN-US_TOPIC_0000001188323748__b61175442161756">SQL_ERROR</strong> or <strong id="EN-US_TOPIC_0000001188323748__b1142683516183">SQL_SUCCESS_WITH_INFO</strong>, the application can then call <a href="dws_04_0143.html">SQLGetDiagRec</a>, set <strong id="EN-US_TOPIC_0000001188323748__b6114118616189">HandleType</strong> and <strong id="EN-US_TOPIC_0000001188323748__b41977672161814">Handle</strong> to <strong id="EN-US_TOPIC_0000001188323748__b39721054161819">SQL_HANDLE_DBC</strong> and <strong id="EN-US_TOPIC_0000001188323748__b33219077161825">ConnectionHandle</strong>, and obtain the <strong id="EN-US_TOPIC_0000001188323748__b32746925161830">SQLSTATE</strong> value. The <strong id="EN-US_TOPIC_0000001188323748__b12783312161837">SQLSTATE</strong> value provides the detailed function calling information.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188323748__s6dae9b45d0d14663b4ebd88e1473bb98"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001188323748__ab09e0ae446f84531b73d2716273280d6">See <a href="dws_04_0123.html">Examples</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0124.html">ODBC Interfaces</a></div>
|
|
</div>
|
|
</div>
|
|
|