dbs Fri Feb 25 09:28:17 2005 EDT
Modified files:
/phpdoc/en/reference/uodbc/functions odbc-prepare.xml
Log:
Discuss OUT and INOUT stored procedure support.
http://cvs.php.net/diff.php/phpdoc/en/reference/uodbc/functions/odbc-prepare.xml?r1=1.2&r2=1.3&ty=u
Index: phpdoc/en/reference/uodbc/functions/odbc-prepare.xml
diff -u phpdoc/en/reference/uodbc/functions/odbc-prepare.xml:1.2
phpdoc/en/reference/uodbc/functions/odbc-prepare.xml:1.3
--- phpdoc/en/reference/uodbc/functions/odbc-prepare.xml:1.2 Wed Apr 17
02:44:52 2002
+++ phpdoc/en/reference/uodbc/functions/odbc-prepare.xml Fri Feb 25
09:28:16 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/uodbc.xml, last change in rev 1.5 -->
<refentry id="function.odbc-prepare">
<refnamediv>
@@ -21,6 +21,31 @@
successfully. The result identifier can be used later to execute
the statement with <function>odbc_execute</function>.
</para>
+ <para>
+ Some databases (such as IBM DB2, MS SQL Server, and Oracle) support
+ stored procedures that accept parameters of type IN, INOUT, and OUT as
+ defined by the ODBC specification. However, the Unified ODBC driver
+ currently only supports parameters of type IN to stored procedures.
+ </para>
+ <para>
+ In the following code, <varname>$res</varname> will only be
+ valid if all three parameters to myproc are IN parameters:
+ <programlisting role='php'>
+<![CDATA[<?php
+$a = 1;
+$b = 2;
+$c = 3;
+$stmt = odbc_prepare($conn, 'CALL myproc(?,?,?)');
+$res = odbc_execute($stmt, array($a, $b, $c));
+?>
+]]>
+ </programlisting>
+ If you need to call a stored procedure using INOUT or OUT parameters,
+ the recommended workaround is to use a native extension for your database
+ (for example, <link linkend='ref.mssql'>mssql</link> for MS SQL Server,
+ or <link linkend='ref.mssql'>oci8</link> for Oracle).
+ </para>
+
</refsect1>
</refentry>