Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages   Examples  

Connection.h

00001 #ifndef __CONNECTION_H_
00002 #define __CONNECTION_H_
00003 
00004 #include "ocicpp.h"
00005 #include "Cursor.h"
00006 #include "BFile.h"
00007 
00008 #include "AQQueue.h"
00009 
00010 #if ( OCILIBVERMAJOR>=8 && OCILIBVERMINOR>=1 ) || DOXYGEN
00011 #include "TLob.h"
00012 #endif
00013 
00014 namespace OCICPP {
00015 
00016 using std::string;
00017 
00018 class Connection {
00019 private:
00020     OCIEnv *envhp;
00021     OCIServer *srvhp;
00022     OCIError *errhp;
00023     OCISvcCtx *svchp;
00024     OCISession *authp;
00025     OCITrans *trans; /* Only one transaction allowed per connection */
00026     sword status;
00027     int Initialized;
00028 public:
00029     Connection();
00030     Connection(OCIEnv *env,const string &tnsname,const string &user,const string &password);
00031     ~Connection(); 
00032     void drop();
00033     void init(OCIEnv *env,const string &tnsname,const string &user,const string &password); 
00034     /* Obsolete should not be used. */
00035     Cursor *execQuery(const string &);
00036     /* Cursor execQuery(const string &); */
00037     /* Use this one... */
00038     void execQuery(const string &,Cursor &,int prefetch=1);
00039     void execUpdate(const string &);
00040     /* Transactions */
00041     void transStart(int flags=SERIALIZABLE);
00042     void transCommit();
00043     void transRollback();
00044     /* Advanced query execution mechanism */
00045     void prepare(const string &sql,Cursor &cur,int prefetch=1);
00046     /* Advanced Queueing */ 
00047     void getQueue(std::string& queue_name, OCICPP::AQQueue& queue);
00048     /* Tlob/BFile support */
00049     void createBFile(const string &,const string &,BFile &);
00050 #if ( OCILIBVERMAJOR>=8 && OCILIBVERMINOR>=1 ) || DOXYGEN
00051     void createTLob(int lobtype,int cachemode,TLob &);
00052 #endif
00053     /* Misc. */
00054     string serverVersion();
00055 
00056 };
00057 
00058 
00059 }
00060 
00061 
00062 #endif
00063 

Generated at Tue Jun 12 10:37:29 2001 for OCI C++ Library by doxygen1.2.4-20010128 written by Dimitri van Heesch, © 1997-2001