Re: [Q] Pro*C++ ?
From: Roger Bjarevall <ebcrbj_at_ebc.ericsson.se>
Date: 15 Dec 1994 11:56:35 GMT
Message-ID: <3cpatk$ms6_at_erinews.ericsson.se>
};
}; Received on Thu Dec 15 1994 - 12:56:35 CET
Date: 15 Dec 1994 11:56:35 GMT
Message-ID: <3cpatk$ms6_at_erinews.ericsson.se>
ax759_at_FreeNet.Carleton.CA (Rashpal Singh) wrote:
>
> Is there such a thing as 'Pro*C++' ? I am looking for such a product (if
> any) under SCO Unix.
> Thanks.
>
Nop! Use oci instead and encapsulate the various oci calls in C++ classes instead.
We have two simple classes, Session and Cursor which makes it quiete object oriented.
Roger Bjarevall
Ericsson Business Networks AB, Sweden
class WhOrSession {
public:
WhOrSession(WhBool setAsCurrent = Wh::true); virtual ~WhOrSession(); virtual void connect(); virtual void connect(const Sring& user, const String& pw); virtual void reConnect(); virtual void disconnect(); virtual void abortTransaction(); static void commit(WhOrSession* aSession = 0); static void rollback(WhOrSession* aSession = 0); virtual void enableTrace(); virtual void disableTrace(); void setAsCurrentSession(); void alert(const char* aFunc); WhBool connected(); int session(); static WhOrSession* currentSession(); const WhOrSession_lda* lda(); private: void trace(WhBool trace); WhOrSession_lda* myLda; static WhOrSession* theCurrentSession; static WhBool connectFlag; short int numberOfSessions;
};
class WhOrCursor
{
public:
WhOrCursor(WhOrSession* aSession = 0); ~WhOrCursor(); void parse(const WhString& sqlStmt, int deferredMode = Wh::true); void bindOut(int position, // odefin() void* variable, int variableSize, int variableType, unsigned short* returnCode = 0, short* indicator = 0); void bindIn(const char* placeHolder, // obndrv() void* variable, const int variableSize, const int variableType, short* indicator = 0); void bindPLSQL(const char* placeHolder, // obndra() void* variable, int variableSize, int variableType, int maxTableSize = 0, unsigned short* returnCode = 0, short* indicatator = 0); void exec(int nRows = 1, int offset = 0); void execFetch(unsigned long nRows = 1); void fetch(int rows = 1); short parseErrorPos(); unsigned short sqlCode(); unsigned long rowsProcessed(); short sqlStmtType(); int functionCode(); int nRows(); private: WhBool cursorOk(); void alert(const char* callingFunc); WhOrCursor_csr* myCursor; WhOrSession* theSession; WhBool isCursorOpened; WhString currentStmt;
}; Received on Thu Dec 15 1994 - 12:56:35 CET