mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-29 13:04:32 +08:00
88 lines
3.6 KiB
HTML
88 lines
3.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>Returns a string containing the SQLSTATE returned by an SQL statement</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.db2-stmt-error" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">db2_stmt_error</h1>
|
|
<p class="verinfo">(PECL ibm_db2 >= 1.0.0)</p><p class="refpurpose"><span class="refname">db2_stmt_error</span> — <span class="dc-title">
|
|
Returns a string containing the SQLSTATE returned by an SQL statement
|
|
</span></p>
|
|
|
|
</div>
|
|
<div class="refsect1 description" id="refsect1-function.db2-stmt-error-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>db2_stmt_error</strong></span>
|
|
([ <span class="methodparam"><span class="type">resource</span> <code class="parameter">$stmt</code></span>
|
|
] ) : <span class="type">string</span></div>
|
|
|
|
|
|
<p class="para rdfs-comment">
|
|
Returns a string containing the SQLSTATE value returned by an SQL statement.
|
|
</p>
|
|
<p class="para">
|
|
If you do not pass a statement resource as an argument to
|
|
<span class="function"><strong>db2_stmt_error()</strong></span>, the driver returns the SQLSTATE
|
|
value associated with the last attempt to return a statement resource, for
|
|
example, from <span class="function"><a href="db2_prepare.html" class="function">db2_prepare()</a></span> or
|
|
<span class="function"><a href="db2_exec.html" class="function">db2_exec()</a></span>.
|
|
</p>
|
|
<p class="para">
|
|
To learn what the SQLSTATE value means, you can issue the following command
|
|
at a DB2 Command Line Processor prompt:
|
|
<strong class="userinput"><code>db2 '? <code class="parameter">sqlstate-value</code>'</code></strong>. You
|
|
can also call <span class="function"><a href="db2_stmt_errormsg.html" class="function">db2_stmt_errormsg()</a></span> to retrieve an
|
|
explicit error message and the associated SQLCODE value.
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.db2-stmt-error-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">stmt</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
A valid statement resource.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.db2-stmt-error-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Returns a string containing an SQLSTATE value.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.db2-stmt-error-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="db2_conn_error.html" class="function" rel="rdfs-seeAlso">db2_conn_error()</a> - Returns a string containing the SQLSTATE returned by the last connection attempt</span></li>
|
|
<li class="member"><span class="function"><a href="db2_conn_errormsg.html" class="function" rel="rdfs-seeAlso">db2_conn_errormsg()</a> - Returns the last connection error message and SQLCODE value</span></li>
|
|
<li class="member"><span class="function"><a href="db2_stmt_errormsg.html" class="function" rel="rdfs-seeAlso">db2_stmt_errormsg()</a> - Returns a string containing the last SQL statement error message</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |