Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

odbc++/callablestatement.h

00001 /* 
00002    This file is part of libodbc++.
00003    
00004    Copyright (C) 1999-2000 Manush Dodunekov <manush@stendahls.net>
00005    
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010    
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015    
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.  If not, write to
00018    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019    Boston, MA 02111-1307, USA.
00020 */
00021 
00022 #ifndef __ODBCXX_CALLABLESTATEMENT_H
00023 #define __ODBCXX_CALLABLESTATEMENT_H
00024 
00025 #include <odbc++/setup.h>
00026 #include <odbc++/types.h>
00027 #include <odbc++/preparedstatement.h>
00028 
00029 namespace odbc {
00030 
00057   class ODBCXX_EXPORT CallableStatement : public PreparedStatement {
00058     friend class Connection;
00059     
00060   private:
00061     bool lastWasNull_;
00062 
00063   protected:
00064     CallableStatement(Connection* con,
00065                       SQLHSTMT hstmt,
00066                       const ODBCXX_STRING& sql,
00067                       int resultSetType,
00068                       int resultSetConcurrency);
00069     
00070   public:
00072     virtual ~CallableStatement();
00073     
00077     double getDouble(int idx);
00078 
00082     bool getBoolean(int idx);
00083 
00087     signed char getByte(int idx);
00088 
00092     ODBCXX_BYTES getBytes(int idx);
00093 
00097     Date getDate(int idx);
00098 
00102     float getFloat(int idx);
00103 
00107     int getInt(int idx);
00108 
00112     Long getLong(int idx);
00113 
00117     short getShort(int idx);
00118 
00122     ODBCXX_STRING getString(int idx);
00123 
00127     Time getTime(int idx);
00128 
00132     Timestamp getTimestamp(int idx);
00133 
00139     void registerOutParameter(int idx, int sqlType) {
00140       this->registerOutParameter(idx,sqlType,0);
00141     }
00142 
00149     void registerOutParameter(int idx, int sqlType, int scale);
00150 
00152     bool wasNull() {
00153       return lastWasNull_;
00154     }
00155   };
00156 
00157   
00158 }; // namespace odbc
00159 
00160 
00161 #endif // __ODBCXX_CALLABLESTATEMENT_H

Go back to the freeodbc++ homepage