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 
00059   class ODBCXX_EXPORT CallableStatement : public PreparedStatement {
00060     friend class Connection;
00061 
00062   private:
00063     bool lastWasNull_;
00064 
00065   protected:
00066     CallableStatement(Connection* con,
00067                       SQLHSTMT hstmt,
00068                       const ODBCXX_STRING& sql,
00069                       int resultSetType,
00070                       int resultSetConcurrency);
00071 
00072   public:
00074     virtual ~CallableStatement();
00075 
00079     double getDouble(int idx);
00080 
00084     bool getBoolean(int idx);
00085 
00089     signed char getByte(int idx);
00090 
00094     ODBCXX_BYTES getBytes(int idx);
00095 
00099     Date getDate(int idx);
00100 
00104     float getFloat(int idx);
00105 
00109     int getInt(int idx);
00110 
00114     Long getLong(int idx);
00115 
00119     short getShort(int idx);
00120 
00124     ODBCXX_STRING getString(int idx);
00125 
00129     Time getTime(int idx);
00130 
00134     Timestamp getTimestamp(int idx);
00135 
00141     void registerOutParameter(int idx, int sqlType) {
00142       this->registerOutParameter(idx,sqlType,0);
00143     }
00144 
00151     void registerOutParameter(int idx, int sqlType, int scale);
00152 
00156     void registerInParameter(int idx);
00157 
00159     bool wasNull() {
00160       return lastWasNull_;
00161     }
00162   };
00163 
00164 
00165 } // namespace odbc
00166 
00167 
00168 #endif // __ODBCXX_CALLABLESTATEMENT_H

Go back to the libodbc++ homepage