Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:22:06

0001 // $Id: TSQLCallableStatement.cxx,v 1.1.1.1 2004/02/18 20:58:02 dave Exp $
0002 //*-- Author : Valeriy Onuchin 14/02/2000 
0003 //
0004 
0005 /////////////////////////////////////////////////////////////////////
0006 //
0007 // A TSQLCallableStatement extends the functionality of a 
0008 // TSQLPreparedStatement, by allowing output parameters.
0009 //
0010 // The ODBC escapes for calling stored procedures and functions 
0011 // should be used. A procedure call is prepared like this:
0012 //
0013 // TSQLCallableStatement* cstmt = 
0014 //             con->PrepareCall("{call my_procedure(?,?,?)}");
0015 //
0016 // 
0017 // And for a function call (a procedure that returns a value), the
0018 // following syntax should be used:
0019 //
0020 // TSQLCallableStatement* cstmt=
0021 //                   con->PrepareCall("{?=call my_function(?,?)}"); 
0022 // 
0023 // All parameters in a TSQLCallableStatement  are treated
0024 // as input/output parameters, unless they are registered as
0025 // output-only parameters with registerOutParameter(). Note that
0026 // output-only parameters must be registered with their proper
0027 // SQL type prior to executing a TSQLCallableStatement.
0028 //
0029 // The interface used to execute SQL stored procedures. It provides a
0030 // stored procedure SQL escape that allows stored procedures to be 
0031 // called in a standard way for all RDBMSs. This escape syntax has 
0032 // one form that includes a result parameter and one that does not. 
0033 // If used, the result parameter must be registered as an OUT parameter.
0034 //  The other parameters can be used for input, output or both. 
0035 ///
0036 // Parameters are referred to sequentially, by number. 
0037 // The first parameter is 1. 
0038 //
0039 //        {?= call ?procedure-name?[?arg1?,?arg2?, ...]}
0040 //        {call ?procedure-name?[?arg1?,?arg2?, ...]}
0041 //      
0042 // IN parameter values are set using the set methods inherited from
0043 // TSQLPreparedStatement. The type of all OUT parameters must be 
0044 // registered prior to executing the stored procedure; their values
0045 // are retrieved after execution via the get methods provided here. 
0046 //
0047 // A TSQLCallableStatement can return one TSQLResultSet or multiple 
0048 // TSQLResultSet objets. Multiple TSQLResultSet objects are handled 
0049 // using operations inherited from TSQLStatement. 
0050 //
0051 // For maximum portability, a call's TSQLResultSet objects and update 
0052 // counts should be processed prior to getting the values of output 
0053 // parameters. 
0054 //
0055 // See also: 
0056 //     TSQLConnection::PrepareCall(TString), TSQLResultSet
0057 //     TSQLStatement TSQLPreparedStatement 
0058 //
0059 // Note: 
0060 //       - Callable statments not supported by MySQL.
0061 //       - I failed to use with OpenLink ODBC driver to Oracle
0062 //
0063 /////////////////////////////////////////////////////////////////////
0064 
0065 #include <RDBC/TSQLCallableStatement.h>
0066 
0067 ClassImpQ(TSQLCallableStatement)
0068