129 lines
8.1 KiB
HTML
129 lines
8.1 KiB
HTML
|
<?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="SQLNextResult - Process the next result set" />
|
||
|
<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="rzadpfnnxtres" />
|
||
|
<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>SQLNextResult</title>
|
||
|
</head>
|
||
|
<body id="rzadpfnnxtres"><a name="rzadpfnnxtres"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">SQLNextResult - Process the next result set</h1>
|
||
|
<div><div class="section"><h4 class="sectiontitle">Purpose</h4> <p><samp class="codeph">SQLNextResult()</samp> determines
|
||
|
whether there is more information available on the statement handle that has
|
||
|
been associated with a stored procedure that is returning result sets.</p>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Syntax</h4><pre>SQLRETURN SQLNextResult (SQLHSTMT StatementHandle,
|
||
|
SQLHSTMT NextResultHandle);</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. SQLNextResult arguments</caption><thead align="left"><tr><th align="left" valign="bottom" width="17.59259259259259%" id="d0e47">Data type</th>
|
||
|
<th align="left" valign="bottom" width="23.51851851851852%" id="d0e49">Argument </th>
|
||
|
<th align="left" valign="bottom" width="11.851851851851853%" id="d0e51">Use </th>
|
||
|
<th align="left" valign="bottom" width="47.03703703703704%" id="d0e53">Description </th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody><tr><td align="left" valign="top" width="17.59259259259259%" headers="d0e47 ">SQLHSTMT </td>
|
||
|
<td align="left" valign="top" width="23.51851851851852%" headers="d0e49 "><em>StatementHandle</em> </td>
|
||
|
<td align="left" valign="top" width="11.851851851851853%" headers="d0e51 ">Input </td>
|
||
|
<td align="left" valign="top" width="47.03703703703704%" headers="d0e53 ">Statement handle.</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="17.59259259259259%" headers="d0e47 ">SQLHSTMT </td>
|
||
|
<td align="left" valign="top" width="23.51851851851852%" headers="d0e49 "><em>NextResultHandle</em></td>
|
||
|
<td align="left" valign="top" width="11.851851851851853%" headers="d0e51 ">Input </td>
|
||
|
<td align="left" valign="top" width="47.03703703703704%" headers="d0e53 ">Statement handle for next result set.</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Usage</h4><p>This function is used to associate the next
|
||
|
result set from StatementHandle with NextResultHandle. This differs from <samp class="codeph">SQLMoreResults()</samp> because
|
||
|
it allows both statement handles to process their result sets simultaneously.</p>
|
||
|
<p>If
|
||
|
all the result sets have been processed, <samp class="codeph">SQLNextResult()</samp> returns
|
||
|
SQL_NO_DATA_FOUND.</p>
|
||
|
<p>If <samp class="codeph">SQLFreeStmt()</samp> is called with
|
||
|
the SQL_CLOSE or SQL_DROP option, all pending result sets on this statement
|
||
|
handle are discarded.</p>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Return codes</h4><div class="p"> <ul><li>SQL_SUCCESS</li>
|
||
|
<li>SQL_SUCCESS_WITH_INFO</li>
|
||
|
<li>SQL_ERROR</li>
|
||
|
<li>SQL_INVALID_HANDLE</li>
|
||
|
<li>SQL_NO_DATA_FOUND</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Error conditions</h4>
|
||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="hsides" border="1" rules="rows"><caption>Table 2. SQLNextResult SQLSTATEs</caption><thead align="left"><tr><th align="left" valign="bottom" width="12.962962962962962%" id="d0e127">SQLSTATE </th>
|
||
|
<th align="left" valign="bottom" width="29.074074074074076%" id="d0e129">Description </th>
|
||
|
<th align="left" valign="bottom" width="57.96296296296296%" id="d0e131">Explanation </th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody><tr><td align="left" valign="top" width="12.962962962962962%" headers="d0e127 "><strong>40</strong>003 <strong>08</strong>S01</td>
|
||
|
<td align="left" valign="top" width="29.074074074074076%" headers="d0e129 ">Communication link failure</td>
|
||
|
<td align="left" valign="top" width="57.96296296296296%" headers="d0e131 ">The communication link between the application
|
||
|
and data source fails before the function is completed.</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="12.962962962962962%" headers="d0e127 "><strong>58</strong>004 </td>
|
||
|
<td align="left" valign="top" width="29.074074074074076%" headers="d0e129 ">Unexpected system failure</td>
|
||
|
<td align="left" valign="top" width="57.96296296296296%" headers="d0e131 ">Unrecoverable system error.</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="12.962962962962962%" headers="d0e127 "><strong>HY</strong>001 </td>
|
||
|
<td align="left" valign="top" width="29.074074074074076%" headers="d0e129 ">Memory allocation failure</td>
|
||
|
<td align="left" valign="top" width="57.96296296296296%" headers="d0e131 ">DB2<sup>®</sup> UDB CLI is unable to allocate memory
|
||
|
required to support the processing or completion of the function.</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="12.962962962962962%" headers="d0e127 "><strong>HY</strong>010</td>
|
||
|
<td align="left" valign="top" width="29.074074074074076%" headers="d0e129 ">Function sequence error</td>
|
||
|
<td align="left" valign="top" width="57.96296296296296%" headers="d0e131 ">The function is called while in a data-at-processing
|
||
|
(<samp class="codeph">SQLParamData()</samp>, <samp class="codeph">SQLPutData()</samp>) operation.</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="12.962962962962962%" headers="d0e127 "><strong>HY</strong>013 </td>
|
||
|
<td align="left" valign="top" width="29.074074074074076%" headers="d0e129 ">Unexpected memory handling error</td>
|
||
|
<td align="left" valign="top" width="57.96296296296296%" headers="d0e131 ">DB2 UDB CLI is unable to access memory required
|
||
|
to support the processing or completion of the function.</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="12.962962962962962%" headers="d0e127 "><strong>HY</strong>021</td>
|
||
|
<td valign="top" width="29.074074074074076%" headers="d0e129 ">Internal descriptor that is not valid </td>
|
||
|
<td valign="top" width="57.96296296296296%" headers="d0e131 ">The internal descriptor cannot be addressed or allocated,
|
||
|
or it contains a value that is not valid.</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="12.962962962962962%" headers="d0e127 "><strong>HY</strong>T00 </td>
|
||
|
<td align="left" valign="top" width="29.074074074074076%" headers="d0e129 ">Timeout expired</td>
|
||
|
<td align="left" valign="top" width="57.96296296296296%" headers="d0e131 "> </td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">References</h4><div class="p"> <ul><li><a href="rzadpfnmrset.htm#rzadpfnmrset">SQLMoreResults - Determine whether there are more result sets</a></li>
|
||
|
</ul>
|
||
|
</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>
|