ibm-information-center/dist/eclipse/plugins/i5OS.ic.cli_5.4.0.1/rzadpfngstmo.htm

119 lines
7.1 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="SQLGetStmtOption - Return current setting of a statement option" />
<meta name="DC.Relation" scheme="URI" content="rzadphdapi.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzadpfngstmo" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>SQLGetStmtOption</title>
</head>
<body id="rzadpfngstmo"><a name="rzadpfngstmo"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">SQLGetStmtOption - Return current setting of a statement option</h1>
<div><div class="section"></div>
<div class="section"><h4 class="sectiontitle">Purpose</h4> <p><img src="./delta.gif" alt="Start of change" /><samp class="codeph">SQLGetStmtOption()</samp> has
been deprecated and replaced with <a href="rzadpfngstma.htm#rzadpfngstma"><samp class="codeph">SQLGetStmtAttr()</samp></a>.
Although this version of DB2<sup>®</sup> UDB CLI continues to support <samp class="codeph">SQLGetStmtOption()</samp>,
it is recommended that you begin using <samp class="codeph">SQLGetStmtAttr()</samp> in
your DB2 UDB
CLI programs so that they conform to the latest standards.<img src="./deltaend.gif" alt="End of change" /></p>
<p><samp class="codeph">SQLGetStmtOption()</samp> returns
the current settings of the specified statement option.</p>
<p>These options
are set using the <samp class="codeph">SQLSetStmtOption()</samp> function.</p>
</div>
<div class="section"><h4 class="sectiontitle">Syntax</h4><pre>SQLRETURN SQLGetStmtOption( SQLHSTMT hstmt,
SQLSMALLINT fOption,
SQLPOINTER pvParam);</pre>
</div>
<div class="section"><h4 class="sectiontitle">Function arguments</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="hsides" border="1" rules="all"><caption>Table 1. SQLStmtOption arguments</caption><thead align="left"><tr><th align="left" valign="top" width="19.961612284069098%" id="d0e73">Data type</th>
<th align="left" valign="top" width="19.385796545105567%" id="d0e75">Argument</th>
<th align="left" valign="top" width="12.092130518234164%" id="d0e77">Use</th>
<th align="left" valign="top" width="48.56046065259117%" id="d0e79">Description</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="19.961612284069098%" headers="d0e73 ">SQLHSTMT</td>
<td align="left" valign="top" width="19.385796545105567%" headers="d0e75 "><em>hstmt</em></td>
<td align="left" valign="top" width="12.092130518234164%" headers="d0e77 ">Input</td>
<td align="left" valign="top" width="48.56046065259117%" headers="d0e79 ">Connection handle.</td>
</tr>
<tr><td align="left" valign="top" width="19.961612284069098%" headers="d0e73 ">SQLPOINTER</td>
<td align="left" valign="top" width="19.385796545105567%" headers="d0e75 "><em>pvParam</em></td>
<td align="left" valign="top" width="12.092130518234164%" headers="d0e77 ">Output</td>
<td align="left" valign="top" width="48.56046065259117%" headers="d0e79 ">Value of the option. Depending on the value
of <em>fOption</em> this can be a 32-bit integer value, or a pointer to a null
terminated character string.</td>
</tr>
<tr><td align="left" valign="top" width="19.961612284069098%" headers="d0e73 ">SQLSMALLINT</td>
<td align="left" valign="top" width="19.385796545105567%" headers="d0e75 "><em>fOption</em></td>
<td align="left" valign="top" width="12.092130518234164%" headers="d0e77 ">Input</td>
<td align="left" valign="top" width="48.56046065259117%" headers="d0e79 ">Option to retrieve. See <a href="rzadpfngstma.htm#rzadpfngstma__tbstmta">Table 2</a> for
more information.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Usage</h4><p><samp class="codeph">SQLGetStmtOption()</samp> provides
the same function as <samp class="codeph">SQLGetStmtAttr()</samp>, both functions are
supported for compatibility reasons.</p>
<p>See <a href="rzadpfngstma.htm#rzadpfngstma__tbstmta">Table 2</a> for
a list of statement options.</p>
</div>
<div class="section"><h4 class="sectiontitle">Return codes</h4><ul><li>SQL_SUCCESS</li>
<li>SQL_SUCCESS_WITH_INFO</li>
<li>SQL_ERROR</li>
<li>SQL_INVALID_HANDLE</li>
</ul>
</div>
<div class="section"><h4 class="sectiontitle">Diagnostics</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="hsides" border="1" rules="rows"><caption>Table 2. SQLStmtOption SQLSTATEs</caption><thead align="left"><tr><th align="left" valign="top" width="25%" id="d0e161">SQLSTATE</th>
<th align="left" valign="top" width="25%" id="d0e163">Description</th>
<th align="left" valign="top" width="50%" id="d0e165">Explanation</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="25%" headers="d0e161 "><strong>HY</strong>001</td>
<td align="left" valign="top" width="25%" headers="d0e163 ">Memory allocation failure</td>
<td align="left" valign="top" width="50%" headers="d0e165 ">The driver is unable to allocate memory required
to support the processing or completion of the function.</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e161 "><strong>HY</strong>009</td>
<td align="left" valign="top" width="25%" headers="d0e163 ">Argument value that is not valid</td>
<td align="left" valign="top" width="50%" headers="d0e165 ">The argument <em>pvParam</em> is a null pointer. <p>A <em>fOption</em> that
is not valid value is specified.</p>
</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e161 "><strong>HY</strong>C00</td>
<td align="left" valign="top" width="25%" headers="d0e163 ">Driver not capable</td>
<td align="left" valign="top" width="50%" headers="d0e165 ">DB2 UDB CLI recognizes the option but does
not support it.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzadphdapi.htm" title="This topic provides a description of each CLI function.">DB2 UDB CLI functions</a></div>
</div>
</div>
</body>
</html>