home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / idspmbsq.inl < prev    next >
Encoding:
Text File  |  1996-02-22  |  2.3 KB  |  40 lines

  1. /********************************************************************************/
  2. /* File:  idspmbsq.inl                                                          */
  3. /* Class: IDSParameterBufferSequence                                            */
  4. /*                                                                              */
  5. /* IDSParameterBufferSequence - sequence of parm buffers                        */
  6. /********************************************************************************/
  7. /******************************************************************************/
  8. /*                                                                            */
  9. /* IBM(R) VisualAge(TM) C++ for OS/2(R), Version 3                            */
  10. /* (C) Copyright IBM Corp. 1991, 1996.                                        */
  11. /*  - Licensed Material - Program-Property of IBM - All Rights Reserved.      */
  12. /* US Government Users Restricted Rights - Use, duplication or disclosure     */
  13. /* restricted by GSA ADP Schedule Contract with IBM Corp.                     */
  14. /*                                                                            */
  15. /******************************************************************************/
  16.  
  17. #include "idspmbsq.hpp"
  18.  
  19. /*------------------------------------------------------------------------------
  20. |   bindToStatement - bind all parameters in seq to statement                  |
  21. ------------------------------------------------------------------------------*/
  22. inline void IDSParameterBufferSequence::bindToStatement(
  23.                                            ISQLStatement* pSqlStatement)
  24. {
  25.   statementInfo info(pSqlStatement);
  26.   allElementsDo (bindParameter, &info);
  27. }
  28.  
  29. /*------------------------------------------------------------------------------
  30. |   bindParameter  - bind a parameter to a statement                           |
  31. ------------------------------------------------------------------------------*/
  32. inline Boolean IDSParameterBufferSequence::bindParameter(
  33.                                IPOBufferBase*& pBuffer,
  34.                                                            void* someInfo)
  35. {
  36.   statementInfo* info = (statementInfo*)someInfo;
  37.   pBuffer->bindToParameter(info->number++, info->sqlStatement);
  38.   return true;
  39. }
  40.