⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch24_01.htm

📁 by Randal L. Schwartz and Tom Phoenix ISBN 0-596-00132-0 Third Edition, published July 2001. (See
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<em class="replaceable"><tt>connection</tt></em> is a valid connection number,then it will be used.</p></div><a name="INDEX-3500" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>GetStmtOption</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;GetStmtOption([<em class="replaceable">option</em>])</pre><p><a name="INDEX-3500" />Returns the value of thespecified statement option <em class="replaceable"><tt>option</tt></em>. (Referto ODBC documentation for more information on the options andvalues.) Returns a string or scalar depending on the optionspecified.</p></div><a name="INDEX-3501" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>MoreResults</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;MoreResults([<em class="replaceable">connection</em>])</pre><p><a name="INDEX-3501" />Reports whether there is datayet to be retrieved from the query. This can happen if the query wasa multiple select:</p><blockquote><pre class="code">"SELECT * FROM [foo] SELECT * FROM [bar]"</pre></blockquote><p>Returns <tt class="literal">1</tt> if there is more data,<tt class="literal">undef</tt> otherwise.</p></div><a name="INDEX-3502" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>RowCount</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;RowCount([<em class="replaceable">connection</em>])</pre><p><a name="INDEX-3502" />For UPDATE, INSERT, and DELETEstatements, the returned value is the number of rows affected by therequest, or <tt class="literal">-1</tt> if the number of affected rows isnot available. Returns the number of affected rows, or<tt class="literal">-1</tt> if not supported by the driver in the currentcontext.</p></div><a name="INDEX-3503" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>Run</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;Run(<em class="replaceable">sql</em>)</pre><p><a name="INDEX-3503" />Executes the SQL command<em class="replaceable"><tt>sql</tt></em> and dumps to the screen info about it.Used primarily for debugging. No return value.</p></div><a name="INDEX-3504" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>SetConnectOption</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;SetConnectOption(<em class="replaceable">option</em>)</pre><p><a name="INDEX-3504" />Sets the value of the specifiedconnect option <em class="replaceable"><tt>option</tt></em>. (Refer to ODBCdocumentation for more information on the options and values.)Returns true on success, false otherwise.</p></div><a name="INDEX-3505" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>SetCursorName</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;SetCursorName(<em class="replaceable">name</em>)</pre><p><a name="INDEX-3505" />Sets the name of the currentcursor. Returns true on success, false otherwise.</p></div><a name="INDEX-3506" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>SetPos</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;SetPos(<em class="replaceable">row</em>, [<em class="replaceable">option</em>, <em class="replaceable">lock</em>])</pre><p><a name="INDEX-3506" />Moves the cursor to the row<em class="replaceable"><tt>row</tt></em> within the current keyset (not thecurrent data/result set). Returns true on success, false otherwise.</p></div><a name="INDEX-3507" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>SetMaxBufSize</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;SetMaxBufSize(<em class="replaceable">size</em>)</pre><p><a name="INDEX-3507" />Sets the MaxBufSize for aparticular connection. The amount of memory allocated to retrieve thefield data of a record is dynamic and changes when it needs to belarger. Returns the maximum number of bytes.</p></div><a name="INDEX-3508" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>SetStmtCloseType</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;SetStmtCloseType(<em class="replaceable">type</em>, [<em class="replaceable">connection</em>])</pre><p><a name="INDEX-3508" />Sets a particular hstmt closetype for the connection. This is the same as<tt class="literal">ODBCFreeStmt(</tt><em class="replaceable"><tt>hstmt</tt></em><tt class="literal">,</tt><em class="replaceable"><tt>type</tt></em><tt class="literal">)</tt>. Bydefault, the connection of the current object will be used. If<em class="replaceable"><tt>connection</tt></em> is a valid connection number,then it will be used. <em class="replaceable"><tt>type</tt></em> may be one of:</p><blockquote><pre class="code">SQL_CLOSESQL_DROPSQL_UNBINDSQL_RESET_PARAMS</pre></blockquote><p>Returns a string indicating the newly set type.</p></div><a name="INDEX-3509" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>SetStmtOption</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;SetStmtOption(<em class="replaceable">option</em>)</pre><p><a name="INDEX-3509" />Sets the value of the specifiedstatement option <em class="replaceable"><tt>option</tt></em>. (Refer to ODBCdocumentation for more information on the options and values.)Returns true on success, false otherwise.</p></div><a name="INDEX-3510" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>Shutdown</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;Shutdown(  )</pre><p><a name="INDEX-3510" />Closes the ODBC connection anddumps to the screen info about it. Used primarily for debugging. Noreturn value.</p></div><a name="INDEX-3511" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>Sql</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;Sql(<em class="replaceable">SQL_STRING</em>)</pre><p><a name="INDEX-3511" />Executes the SQL command<em class="replaceable"><tt>SQL_STRING</tt></em> on the current connection.Returns <tt class="literal">?</tt> on success, or an error number onfailure.</p></div><a name="INDEX-3512" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>TableList</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;TableList(<em class="replaceable">qualifier</em>, <em class="replaceable">owner</em>, <em class="replaceable">name</em>, <em class="replaceable">type</em>)</pre><p><a name="INDEX-3512" />Returns the catalog of tablesavailable in the DSN. For an unknown parameter, just specify theempty string "". Returns an arrayof table names.</p></div><a name="INDEX-3513" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>Transact</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;Transact(<em class="replaceable">type</em>)</pre><p><a name="INDEX-3513" />Forces the ODBC connection toperform a rollback or commit transaction.<em class="replaceable"><tt>type</tt></em> may be one of:</p><blockquote><pre class="code">SQL_COMMITSQL_ROLLBACK</pre></blockquote><p>Returns true on success, false otherwise.</p></div><a name="INDEX-3514" /><a name="INDEX-3515" /><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>Version</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>Win32::ODBC-&gt;Version(<em class="replaceable">packages</em>)</pre><p><a name="INDEX-3514" />Returns an array of versionnumbers for the requested packages (<em class="filename">ODBC.pm</em> or<em class="filename">ODBC.PLL</em>). If the list<em class="replaceable"><tt>packages</tt></em> is empty, then all versionnumbers are returned.<a name="INDEX-3515" /></p></div></div><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch23_05.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td align="right" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">23.5. Win32::OLE::Const</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td align="right" valign="top" width="228">Index</td></tr></table></div><hr width="684" align="left" /><img src="../gifs/navbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links" /><p><p><font size="-1"><a href="copyrght.htm">Copyright &copy; 2002</a> O'Reilly &amp; Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,85,94" href="../index.htm"><area shape="rect" coords="86,1,178,103" href="../lwp/index.htm"><area shape="rect" coords="180,0,265,103" href="../lperl/index.htm"><area shape="rect" coords="267,0,353,105" href="../perlnut/index.htm"><area shape="rect" coords="354,1,446,115" href="../prog/index.htm"><area shape="rect" coords="448,0,526,132" href="../tk/index.htm"><area shape="rect" coords="528,1,615,119" href="../cookbook/index.htm"><area shape="rect" coords="617,0,690,135" href="../pxml/index.htm">      </map></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -