doc-exports/docs/dws/dev/dws_04_0104.html
Lu, Huayi e6fa411af0 DWS DEV 830.201 version
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>
2024-05-16 07:24:04 +00:00

139 lines
13 KiB
HTML

<a name="EN-US_TOPIC_0000001188323546"></a><a name="EN-US_TOPIC_0000001188323546"></a>
<h1 class="topictitle1">java.sql.CallableStatement</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001188323546__acd1166d7a0d94f92954ac25792ad6568">This section describes <strong id="EN-US_TOPIC_0000001188323546__b842352706151936">java.sql.CallableStatement</strong>, the stored procedure execution interface.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001188323546__t89760d91fed840b2906f47199ed12119" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Support status for java.sql.CallableStatement</caption><thead align="left"><tr id="EN-US_TOPIC_0000001188323546__rd4b85e15174a4b79b89637e427ae30fb"><th align="left" class="cellrowborder" valign="top" width="38.33%" id="mcps1.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001188323546__a57ee21d18e604a6591f8ba97a832af5f">Method Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="30.330000000000002%" id="mcps1.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000001188323546__aa05c77e9cabc42e09e60264d809394fc">Return Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="31.34%" id="mcps1.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000001188323546__a6fbd9f31adda41658071cbc7b0d5a0ae">Support JDBC 4</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001188323546__r9ae6825eb72d4c1093e0f1238270aa4f"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__a97e71ccfa60244baaa0c1303ef554e9d">registerOutParameter(int parameterIndex, int type)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a444189289cbd45009574beb416f0b422">void</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__a074d8dbe2a464419a97d6717005f7b7b">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r0ee0d21df42142f4a937428702ac4302"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__a5d42ea0895314174bc0c7957dee1cfad">wasNull()</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__acfd19365043a4c2696c8daed2afba81c"><span id="EN-US_TOPIC_0000001188323546__text2701421292">boolean</span></p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__a9d196a06adc24b028c88c8310a909cd2">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r79fbb3654727455aac63a0af3f814e22"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__a72dafc9d8f3b4d5ba36c7be0bf88093e">getString(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a54761aaf1a1448de88ed888d2c60e0ee">String</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__aaa66f714f38d4fd68cebc76d8f567266">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r35d07882b5d8480c84d34cb5a2e6dad5"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__ad7d39a6c3ea142ecb712056cd6a7a840">getBoolean(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a905287f0779a46629a5639bd4f5f85c9"><span id="EN-US_TOPIC_0000001188323546__text9623517912">boolean</span></p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__aaf2293614ec44695900e52c016a96ebf">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__ra2799a88c05c485e8125866cc1f87eaf"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__ae52fedc7b9c544aebfa76f0c49dc3e43">getByte(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a31fe9e0fa1aa467a947a89fef4d53262">byte</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__a2aaaddee09624130b22bee3f2775f484">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r7c4b26d73da2463396e562945806e0d7"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__aba7b013c95be45339b2f8aa2b7d275eb">getShort(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a7051958a96594c0ab69c77086fbe5ab6">short</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__abfd2a83d0bdb4c8abdacf4ce14d4eda8">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r5c34dae3bedd4c0291b19dfb8e173670"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__a6b0a989e5fc34a0f9d32657eef181f82">getInt(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a21469b4d7c154d7b8ebadd3315c3c823">int</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__ab6dd443265534fffa588e8ad5082d9ad">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r10dd72eeb1204a0fac7dd5742ba47eaf"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__a655e8ed5e8f042a58088a959a95ca312">getLong(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a95ec5134d1d34c1ea323593058a6e427">long</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__ae643427b0be7475080ec453e9a9d2611">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r80b516110e9d476ab4abd8f0f76784d3"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__a91ed19d864f14eabb08c7b04ef722583">getFloat(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__afa742b30a831472d87b75f1344d05ee8">float</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__a59a11230c4aa475d8d3dbb5616cf5ca6">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r78afdb36b62841ac94bc6ea11aa02fc1"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__a962873699fb34bd9be59aa9abdf0d897">getDouble(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a38323a335aa442158ee95debd36ae736">double</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__a44a383bb4fef4eaabb43b6847e710c77">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__rd1fe9c010d27404d808b37f884f54424"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__ac75d9be5479a41e68a5865af332d9849">getBigDecimal(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__ae461c8e035b543549909779a8e3da92f">BigDecimal</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__a5c2b7e9aa6f5404cae3b1ddd3b0a10cc">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r2722f73f02904381b09277b144b1ae0f"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__aec3848b405b24c5b9d80fdeb2838b272">getBytes(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__af19115b3fc3c4c28a6b311d869847a04">byte[]</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__a9652a6f549074a038685b687f43e47da">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r36c8ef9525344952b63cdf63bfb4f515"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__ac6283f45aa2f48ffb82d44a370bec15d">getDate(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a850cf6ee7d884360abcffde6a1f2b351">Date</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__ae147266f07b24f9c96e8b263b68d273c">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r8b0fe754b3694cc199b7de2d8cd99476"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__ad0541b50a2874824b829d2d82bc03aa9">getTime(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a427671d3a3904f27b39ce1897dd77fb4">Time</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__ac2f798b2f4824e38a6501e73590dc6c7">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__rde25ecfae5764df1b0a828a18f5556ed"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__ae8645b9ee79f4366833a333c34b12a0f">getTimestamp(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a4091748e51654448aa6d9c8ed7b2dd9b">Timestamp</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__a6a67a97281cb47bbbf05ce1293aae290">Yes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188323546__r0e94eed9ad0a44f0b26b6a58c10d8575"><td class="cellrowborder" valign="top" width="38.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001188323546__ae01ffff3e9e9448a8a5c9c8701b88bef">getObject(int parameterIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="30.330000000000002%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001188323546__a7567113d1ada4c8389a98bb5295f6344">Object</p>
</td>
<td class="cellrowborder" valign="top" width="31.34%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001188323546__ab27bfcee0b3248bd970b82f8ba20755c">Yes</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="EN-US_TOPIC_0000001188323546__ne62341712a7d464ab0ef0469a17a6dec"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001188323546__u6e0b566af17f4ecca3f672a49c0d84c9"><li id="EN-US_TOPIC_0000001188323546__l6abfbc3b6f134f32a7c78b146a77c1de">The batch operation of statements containing OUT parameter is not allowed.</li><li id="EN-US_TOPIC_0000001188323546__l2f51239c075647d896839961b6d19518">The following methods are inherited from java.sql.Statement: close, execute, executeQuery, executeUpdate, getConnection, getResultSet, getUpdateCount, isClosed, setMaxRows, and setFetchSize.</li><li id="EN-US_TOPIC_0000001188323546__l1bdc40ccee564b1fbb378cc4032fff30">The following methods are inherited from java.sql.PreparedStatement: addBatch, clearParameters, execute, executeQuery, executeUpdate, getMetaData, setBigDecimal, setBoolean, setByte, setBytes, setDate, setDouble, setFloat, setInt, setLong, setNull, setObject, setString, setTime, and setTimestamp.</li></ul>
</div></div>
<p id="EN-US_TOPIC_0000001188323546__abc993f3e983c4780b94eb090fd83226d"></p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0102.html">JDBC Interface Reference</a></div>
</div>
</div>