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>
49 lines
6.3 KiB
HTML
49 lines
6.3 KiB
HTML
<a name="EN-US_TOPIC_0000001233681677"></a><a name="EN-US_TOPIC_0000001233681677"></a>
|
|
|
|
<h1 class="topictitle1">SQLFreeHandle</h1>
|
|
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001233681677__s6fc504a2802a48a18ebe38014a130d63"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001233681677__adf2a34a15f424a23922a20340b016824"><strong id="EN-US_TOPIC_0000001233681677__b842352706145156">SQLFreeHandle</strong> releases resources associated with a specific environment, connection, or statement handle. It replaces the ODBC 2.x functions: <strong id="EN-US_TOPIC_0000001233681677__b842352706145218">SQLFreeEnv</strong>, <strong id="EN-US_TOPIC_0000001233681677__b842352706145222">SQLFreeConnect</strong>, and <strong id="EN-US_TOPIC_0000001233681677__b842352706145225">SQLFreeStmt</strong>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233681677__s64421fb75bd343f49b84dea99fb107b4"><h4 class="sectiontitle">Prototype</h4><div class="codecoloring" codetype="Cpp" id="EN-US_TOPIC_0000001233681677__s1ac3a41d5391418b9acca6bb42272aed"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">SQLRETURN</span><span class="w"> </span><span class="nf">SQLFreeHandle</span><span class="p">(</span><span class="n">SQLSMALLINT</span><span class="w"> </span><span class="n">HandleType</span><span class="p">,</span><span class="w"> </span>
|
|
<span class="w"> </span><span class="n">SQLHANDLE</span><span class="w"> </span><span class="n">Handle</span><span class="p">);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233681677__s2260eea4054a436ca9f67876e93902f7"><h4 class="sectiontitle">Parameter</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233681677__tf8d511ef223741de9dbae09bf29162ea" frame="border" border="1" rules="all"><caption><b>Table 1 </b>SQLFreeHandle parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233681677__r1112958b13f046c38081d03f7040151c"><th align="left" class="cellrowborder" valign="top" width="29.69%" id="mcps1.3.3.2.2.3.1.1"><p id="EN-US_TOPIC_0000001233681677__a6fba3c82cd874a1b81ea1d08c0029176">Keyword</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70.30999999999999%" id="mcps1.3.3.2.2.3.1.2"><p id="EN-US_TOPIC_0000001233681677__ad94027e63c30449582268869c8a3f372">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001233681677__r76b2126cfe6c40ca8d304943f38457a6"><td class="cellrowborder" valign="top" width="29.69%" headers="mcps1.3.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233681677__a48d605c9fb444aa98e7da988c1549dbb">HandleType</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.30999999999999%" headers="mcps1.3.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233681677__aca4c265bd6a74e51985dbfedcc391232">The type of handle to be freed by SQLFreeHandle. The value must be one of the following:</p>
|
|
<ul id="EN-US_TOPIC_0000001233681677__ua293e4e65a244602b2b73039a1f7fd12"><li id="EN-US_TOPIC_0000001233681677__l1296415b9a424e3c8d2e9084c7c38f7a">SQL_HANDLE_ENV</li><li id="EN-US_TOPIC_0000001233681677__l3946dbae4425404fb201f3aee422965a">SQL_HANDLE_DBC</li><li id="EN-US_TOPIC_0000001233681677__l38bcc94916d5445eadce65f1792627bf">SQL_HANDLE_STMT</li><li id="EN-US_TOPIC_0000001233681677__lfb450b6b946542e4bc96cc42ab5ba9d9">SQL_HANDLE_DESC</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233681677__ae59811d51d4347e3bb527fcce0cc923c">If <strong id="EN-US_TOPIC_0000001233681677__b842352706145246">HandleType</strong> is not one of the preceding values, <strong id="EN-US_TOPIC_0000001233681677__b842352706145253">SQLFreeHandle</strong> returns <strong id="EN-US_TOPIC_0000001233681677__b842352706145259">SQL_INVALID_HANDLE</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233681677__r200a0fa71bb2401dbb63d6d00e6eaec8"><td class="cellrowborder" valign="top" width="29.69%" headers="mcps1.3.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233681677__ab38e719199f34384bbf3cd0a286d2e94">Handle</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.30999999999999%" headers="mcps1.3.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233681677__a12b15aa9be3d4c17bae2b403c1250121">The name of the handle to be freed.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233681677__s61ba7e073b9b4542aba3a0314acf5a5f"><h4 class="sectiontitle">Return Values</h4><ul id="EN-US_TOPIC_0000001233681677__en-us_topic_0059779231_ul81431234355"><li id="EN-US_TOPIC_0000001233681677__ldeaea480407c4fc2b5f1551f5fb87a8d"><strong id="EN-US_TOPIC_0000001233681677__b842352706112950">SQL_SUCCESS</strong> indicates that the call succeeded.</li><li id="EN-US_TOPIC_0000001233681677__lf542ccd96077418fb2614ec9d20a53bb"><strong id="EN-US_TOPIC_0000001233681677__b842352706112952">SQL_SUCCESS_WITH_INFO</strong> indicates some warning information is displayed.</li><li id="EN-US_TOPIC_0000001233681677__l936bbac3a8fa4cacb18b2652a296620b"><strong id="EN-US_TOPIC_0000001233681677__b842352706112954">SQL_ERROR</strong> indicates major errors, such as memory allocation and connection failures.</li><li id="EN-US_TOPIC_0000001233681677__la1b527272f8d408aa80f7b181988581b"><strong id="EN-US_TOPIC_0000001233681677__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_0000001233681677__s5fd2e5b86d634cf29d036bb5bbaf0150"><h4 class="sectiontitle">Precautions</h4><p id="EN-US_TOPIC_0000001233681677__af79ac595d7244e1186f48ecd868fa8fe">If <strong id="EN-US_TOPIC_0000001233681677__b842352706145325">SQLFreeHandle</strong> returns <strong id="EN-US_TOPIC_0000001233681677__b842352706145327">SQL_ERROR</strong>, the handle is still valid.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233681677__s4eb1180b04a6488b8ee293d028f94f7d"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001233681677__a66689d46c3654d7a9e16b9ad4455da58">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>
|
|
|