/****************************************************************************/ // SQLMGR.H v1.0 - 03 11 1990 /****************************************************************************/ /* */ /* Copyright (c) 1989-1993 Bernhard Strassl */ /* Institute for Applied Computer Science and Information Systems */ /* University of Vienna, Austria */ /* */ /* See file COPYRIGHT in this directory for details. If this file is */ /* missing please mail to bernhard@ani.univie.ac.at */ /****************************************************************************/ #ifndef _CB_SQLMGR_INCLUDED #define _CB_SQLMGR_INCLUDED 1 // SqlMgr - an extended interface to class SqlSvr #include // user definitions #include // system internal definitions class SqlSvr; class CursorInfo; class BindDescr; class SqlMgr { friend class SqlSvr; friend class SqlObjectMgr; friend testMgr(); SqlSvr* svr; SqlHandle immHandle; char* curUID; bool active; public: SqlMgr(const char* = NULL); // initialize (and start) ~SqlMgr(); // terminate bool start(const char*); // start with given UID SqlHandle open(const char*, ...); // open SQL access (compile and bind) bool execute(SqlHandle); // execute statement bool fetch(SqlHandle); // get data into vars or objects bool close(SqlHandle&); // end SQL access bool perform(const char*, ...); // perform one-shot SQL access bool changeUser(const char*); // set UID for further connects bool suspend(bool); // disconnect all / reconnect immediate bool commit(); // database direct commit bool rollback(); // database direct rollback short status(SqlHandle = 0); // get current operation (CB-) status long rowCount(SqlHandle = 0); // get current operation row count bool setMuLevel(short); // multi user level bool setErrorHandler(CbErrorHandler); bool svrCmd(char*, ...); // server specific call (avoid as possible) int svrStatus(SqlHandle = 0); // server specific status (avoid as possible) private: bool checkHandle(SqlHandle&); bool bind(CursorInfo*, BindDescr*, BindDescr*); }; /* SqlHandle openQuery(char*, char*, ...); // open a named query */ #endif