00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __MSD_DATA_H__
00016 #define __MSD_DATA_H__
00017
00018 #ifndef __MSD_DATATYPES_H__
00019 #include "msd_datatypes.h"
00020 #endif
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00059 class MSDSelect {
00060
00061
00062 public:
00063 int buff;
00064
00065
00066 MSDSelect();
00067 void InitSql(msdbConnect& r_db, char* stm);
00068
00069 let collist;
00070 let colliststr;
00071 ~MSDSelect(){};
00072 void MakeRecord();
00073 void GetNext();
00074 int GetRowNum();
00075 void SetCriteria(char* strCVal);
00076 void SetCriteria(double dfCVal);
00077 void SetCriteria(float fCVal);
00078 void SetCriteria(int iCVal);
00079 void SetCriteria(unsigned int uiCVal);
00080 void SetCriteria(short int shiCVal);
00081 void SetCriteria(long int liCVal);
00082 int GetVal(int col, float& f);
00083 int GetVal(int col, int& i);
00084 int GetVal(int col, char*& val);
00085 int GetVal(int col, double& d);
00086
00087 protected:
00088 int j;
00089 otl_column_desc * desc;
00090 int desc_len;
00091 msdbStream * pos;
00092 msd_array * p;
00093 };
00094
00095
00096 class MSDHandle {
00097 public:
00098 const msdbConnect * vp_dbhandle[MAXCONN];
00099 const MSDSelect * vp_sql[MAXCONN][MAXSQL];
00100 MSDHandle();
00101 ~MSDHandle(){};
00102 };
00103
00104
00105
00106
00107 void new_exec_query (int bf, msdbConnect& r_db, char* stm, MSDDataSet& rs);
00108 int msd_exec_query (int bf, msdbConnect& r_db, char* stm, MSDDataSet& rs, char* rs_table, const char* argtype ,...);
00109
00110 let msd_make_rowlist(let se);
00111
00112 void genselect(msdbConnect& r_db, char* stm);
00113
00114 #endif //__MSD_DATA_H__