00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __C_CURSOR_H__
00016 #define __C_CURSOR_H__
00017
00018
00019 #include <lTypes.h>
00020 #include <lExceptions.h>
00021
00022 class DLL_External Cursor
00023 {
00024 #ifdef POLITE_TEST_FRIEND
00025 friend POLITE_TEST_FRIEND;
00026 #endif // POLITE_TEST_FRIEND
00027
00028 friend class Connection;
00029 friend class ResultBase;
00030 friend class ProtoBase;
00031
00032 protected:
00033 class Connection *_DatabaseConnection;
00034 bool _Opened;
00035 Cursor(
00036 class Connection *DbC
00037 );
00038
00039 public:
00040 virtual ~Cursor();
00041
00042 protected:
00043 virtual bool _Open();
00044 virtual bool _Prepare(const char * const SqlCommand) = 0;
00045 virtual bool _PreExecBind(
00046 const char *const VarName,
00047 const void *VarAddr,
00048 const int VarLen,
00049 const char VarType,
00050 const short *VarInd = NULL
00051 ) = 0;
00052 virtual bool _Execute() = 0;
00053 virtual bool _PreFetchBind(
00054 const int Position,
00055 const void *VarAddr,
00056 const int VarLen,
00057 const char VarType,
00058 const short *VarInd = NULL
00059 ) = 0;
00060 virtual bool _FetchNext() = 0;
00061 virtual bool _FetchPrev() = 0;
00062 virtual long _Position() = 0;
00063 virtual bool _Close();
00064 char *_GetUserName();
00065 char *_GetPassword();
00066 };
00067
00068 #endif //__C_CURSOR_H__
00069