//*-- AUTHOR : Ilse Koenig //*-- Modified : 14/09/2000 //_HADES_CLASS_DESCRIPTION ///////////////////////////////////////////////////////////// // // HDbFileUtil // // Class for FileI/O to/from Oracle tables // ///////////////////////////////////////////////////////////// using namespace std; #include "hdbfileutil.h" #include "hdbconn.h" #include #include #define SQLCA_STORAGE_CLASS extern #define ORACA_STORAGE_CLASS extern // Oracle communication area #include // SQL Communications Area #include ClassImp(HDbFileUtil) void HDbFileUtil::commit(void) { // commits all changes if (!dbConn->isOpen()) return; EXEC SQL WHENEVER SQLERROR DO showSqlError("HDbConn::commit"); EXEC SQL COMMIT WORK; cout<<"*************************************************************"<isOpen()) return; EXEC SQL WHENEVER SQLERROR DO showSqlError("HDbConn::rollback"); EXEC SQL ROLLBACK WORK; cout<<"*************************************************************"<0) { s2=s1(0,n); s2=s2.Strip(s2.kBoth); n+=strlen(delim); s1=s1(n,s1.Length()-n); s1=s1.Strip(s1.kLeading); return s1.Length(); } if (n==0) { s2=""; s1.Remove(0,strlen(delim)); // remove delimiter s1=s1.Strip(s1.kLeading); return s1.Length(); } s2=s1.Strip(s1.kLeading); s1=""; return 0; } Bool_t HDbFileUtil::confirm(const Char_t * action) { Char_t buf[80]; cout<<"Confirm "< "<>buf; if (buf[0]=='y' || buf[0]=='Y') return kTRUE; else return kFALSE; }