00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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 }
00166
00167
00168 #endif // __ODBCXX_CALLABLESTATEMENT_H