Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to link an OCI application???
Here is a class implementation that obviates the need for linking.
Either instance and use it directly, or inherit from it to use the
fiunctions in your own class. This works with 7.x OCI, you could
modify it to use 8.x. This does presume that you have the oratypes.h,
and other headers, from the OCI installation and that the definition
of 'text' in these has been changed to 'otext'
//******************************* BEGIN WOCI.H *********************************
#define __W_OCI_H
#ifndef WINVER
#include <windows.h>
#endif
#ifndef ORATYPES
#include "oratypes.h" //this is the oratypes.h with text
redefined to otext to prevent collision with IOS
#endif
#ifndef OCIDFN
#include "ocidfn.h"
#endif
/* OCI Function Pointer type Definitions */
typedef sword (*OCI_01) (struct cda_def *,ub1 *,otext *,sword,otext
*,sword,otext *, sword, ub4);
typedef sword (*OCI_02) (struct cda_def *,struct cda_def *,otext
*,sword,sword,otext *,sword);
typedef sword (*OCI_03) (struct cda_def *,otext *,sb4,sword,ub4); typedef sword (*OCI_04) (struct cda_def *); typedef sword (*OCI_05) (struct cda_def *,sb2,otext *,sword); typedef sword (*OCI_06) (struct cda_def *,ub1 *,otext *,sword,otext*,sword, sword);
typedef sword (*OCI_08) (struct cda_def *,otext *,sword,ub1 *,sword,sword,sword,sb2 *,ub2 *,ub2 *,ub4,ub4 *,otext *,sword,sword); typedef sword (*OCI_09) (struct cda_def *,sword,ub1*,sword,sword,sword,sb2 *,otext *,sword,sword); typedef sword (*OCI_10) (struct cda_def *,otext *,sword,ub1 *,sword,sword,sword,sb2 *,otext *,sword,sword); typedef sword (*OCI_11) (struct cda_def *,otext *,sword,ub1 *,sword,sword,sword,sb2 *,otext *,sword,sword); typedef sword (*OCI_12) (struct cda_def *,sword,ub1 *,sword,sword,sword,sb2 *,otext *,sword,sword,ub2 *,ub2 *); typedef sword (*OCI_13) (struct cda_def *,ub1,sword,ub1 *,sb4,sword,sword,sb2 *,otext *,sb4,sword,ub2 *,ub2 *,sb4,sb4,sb4,sb4);
typedef sword (*OCI_16) (struct cda_def *,ub4,sword,sword); typedef sword (*OCI_17) (struct cda_def *,sword,sword); typedef sword (*OCI_18) (struct cda_def *,sword); typedef sword (*OCI_19) (struct cda_def *,sword,ub1 *,sb4,sword,ub4*,sb4);
typedef sword (*OCI_21) (ub4); typedef sword (*OCI_22) (struct cda_def *,sb1,dvoid *,ub4 *); typedef dvoid (*OCI_23) (struct cda_def *,otext *,sb4 *); typedef dvoid (*OCI_24) (struct cda_def *); typedef sword (*OCI_25) (struct cda_def *,sword,sb2 *,sb2 *,sb2 *,sb2*,otext *,sb2 *,sb2 *);
/*Funtion names*/
#define SZ_OBINDPS "obindps"
#define SZ_OBNDRA "obndra"
#define SZ_OBNDRN "obndrn"
#define SZ_OBNDRV "obndrv"
#define SZ_OBREAK "obreak"
#define SZ_OCAN "ocan"
#define SZ_OCLOSE "oclose"
#define SZ_OCOF "ocof"
#define SZ_OCOM "ocom"
#define SZ_OCON "ocon"
#define SZ_ODEFIN "odefin"
#define SZ_ODEFINPS "odefinps"
#define SZ_ODSC "odsc"
#define SZ_ODESCR "odescr"
#define SZ_ODESSP "odessp"
#define SZ_OERHMS "oerhms"
#define SZ_OERMSG "oermsg"
#define SZ_OEXEC "oexec"
#define SZ_OEXFET "oexfet"
#define SZ_OEXN "oexn"
#define SZ_OFEN "ofen"
#define SZ_OFETCH "ofetch"
#define SZ_OFLNG "oflng"
#define SZ_OGETPI "ogetpi"
#define SZ_OLOG "olog"
#define SZ_OLOGOF "ologof"
#define SZ_OLON "olon"
#define SZ_ONAME "oname"
#define SZ_ONBCLR "onbclr"
#define SZ_ONBSET "onbset"
#define SZ_ONBTST "onbtst"
#define SZ_OOPEN "oopen"
#define SZ_OOPT "oopt"
#define SZ_ORLON "orlon"
#define SZ_OPARSE "oparse"
#define SZ_OPINIT "opinit"
#define SZ_OROL "orol"
#define SZ_OSETPI "osetpi"
#define SZ_OSQL3 "osql3"
#define SZ_OSQLLD2 "sqlld2"
#define SZ_OSQLLDA "sqllda"
class WOCI {
public:
enum OCIHandles {
E_obindps, E_obndra, E_obndrn, E_obndrv, E_obreak, E_ocan, E_oclose, E_ocof, E_ocom, E_ocon, E_odefin, E_odefinps, E_odsc, E_odescr, E_odessp, E_oerhms, E_oermsg, E_oexec, E_oexfet, E_oexn, E_ofen, E_ofetch, E_oflng, E_ogetpi, E_olog, E_ologof, E_olon, E_oname, E_onbclr, E_onbset, E_onbtst, E_oopen, E_oopt, E_orlon, E_oparse, E_opinit, E_orol, E_osetpi, E_osql3, E_sqlld2, E_sqllda, E_End,
/* OCI Function Pointer Declarations */
OCI_07 o_bindps; OCI_08 o_bndra; OCI_09 o_bndrn; OCI_10 o_bndrv; OCI_04 o_break; OCI_04 o_can; OCI_04 o_close; OCI_04 o_cof; OCI_04 o_com; OCI_04 o_con; OCI_12 o_defin; OCI_13 o_definps; OCI_25 o_dsc; OCI_14 o_descr; OCI_15 o_dessp; OCI_05 o_erhms; OCI_26 o_ermsg; OCI_04 o_exec; OCI_16 o_exfet; OCI_17 o_exn; OCI_18 o_fen; OCI_04 o_fetch; OCI_19 o_flng; OCI_20 o_getpi; OCI_01 o_log; OCI_04 o_logof; OCI_27 o_lon; OCI_28 o_name; OCI_04 o_nbclr; OCI_04 o_nbset; OCI_04 o_nbtst; OCI_02 o_open; OCI_17 o_opt; OCI_06 o_rlon; OCI_03 o_parse; OCI_21 o_pinit; OCI_04 o_rol; OCI_22 o_setpi; OCI_29 o_sql3; OCI_23 o_sqlld2; OCI_24 o_sqllda;
int m_ver; char m_msg[512]; public: WOCI(); WOCI(int); virtual ~WOCI(); int InitOCI(int ver = 0); void DeinitOCI(void); sword obindps(struct cda_def *cursor,ub1 opcode,otext*sqlvar,sb4 sqlvl,ub1 *pvctx,sb4 progvl,sword ftype,sword scale,sb2 *indp,ub2 *alenp,ub2 *rcodep,sb4 pv_skip,sb4 ind_skip,sb4 alen_skip,sb4 rc_skip,ub4 maxsiz,ub4 *cursiz,otext *fmt,sb4 fmtl,sword fmtt);
sword obndra(struct cda_def *cursor,otext *sqlvar,sword sqlvl,ub1 *progv,sword progvl,sword ftype,sword scale,sb2 *indp,ub2 *alen,ub2 *arcode,ub4 maxsiz,ub4 *cursiz,otext *fmt,sword fmtl,sword fmtt);
sword obndrn(struct cda_def *cursor,sword sqlvn,ub1 *progv,sword progvl,sword ftype,sword scale,sb2 *indp,otext *fmt,sword fmtl,sword fmtt);
sword obndrv(struct cda_def *cursor,otext *sqlvar,sword sqlvl,ub1 *progv,sword progvl,sword ftype,sword scale,sb2 *indp,otext *fmt,sword fmtl,sword fmtt);
sword obreak(struct cda_def *lda); sword ocan(struct cda_def *cursor); sword oclose(struct cda_def *cursor); sword ocof(struct cda_def *lda); sword ocom(struct cda_def *lda); sword ocon(struct cda_def *lda); sword odefin(struct cda_def *cursor,sword pos,ub1 *buf,swordbuf1,sword ftype,sword scale,sb2 *indp,otext *fmt,sword fmtl,sword fmtt,ub2 *rlen,ub2 *rcode);
sword odefinps(struct cda_def *cursor,ub1 opcode,sword pos,ub1 *bufctx,sb4 bufl,sword ftype,sword scale,sb2 *indp,otext *fmt,sb4 fmtl,sword fmtt,ub2 *rlenp,ub2 *rcodep,sb4 buf_skip,sb4 ind_skip,sb4 len_skip,sb4 rc_skip);
sword odsc(struct cda_def *cursor,sword pos,sb2 *dbsize,sb2 *fsize,sb2 *rcode,sb2 *dbtype,otext *cbuf,sb2 *cbufl,sb2 *dsize);
sword odescr(struct cda_def *cursor,sword pos,sb4 *dbsize,sb2 *dbtype,sb1 *cbuf,sb4 *cbufl,sb4 *dsize,sb2 *prec,sb2 *scale,sb2 *nullok);
sword odessp(struct cda_def *lda,otext *objnam,size_t onlen,ub1 *rsv1,size_t rsv1ln,ub1 *rsv2,size_t rsv2ln,ub2 *ovrld,ub2
*pos,ub2 *level,otext **argnm,ub2 *arnlen,ub2 *dtype,ub1 *defsup,ub1 *mode,ub4 *dtsiz,sb2 *prec,sb2 *scale,ub1 *radix,ub4 *spare,ub4 *arrsiz); sword oerhms(struct cda_def *lda,sb2 rcode,otext *buf,sword bufsiz); sword oermsg(ub2 rcode,otext *msg); sword oexec(struct cda_def *cursor); sword oexfet(struct cda_def *cursor,ub4 nrows,sword cancel,sword exact); sword oexn(struct cda_def *cursor,sword iters,sword rowoff); sword ofen(struct cda_def *cursor,sword nrows); sword ofetch(struct cda_def *cursor); sword oflng(struct cda_def *cursor,sword pos,ub1 *buf,sb4 bufl,sword dtype,ub4 *retl,sb4 offset); sword ogetpi(struct cda_def *cursor,sb1 *piecep,dvoid **ctxpp,eword *iterp,eword *indexp); sword olog(struct cda_def *lda,ub1 *hda,otext *uid,sword uidl,otext *pswd,sword pswdl,otext *conn, sword connl, ub4 mode); sword ologof(struct cda_def *lda); sword olon(struct cda_def *lda,otext *uid, sword uidl, otext *pswd, sword pswdl, sword audit); sword oname(struct cda_def *cursor,sword pos,sb1 *tbuf,sb2 *tubfl,sb1 *cbuf,sb2 *cbufl); sword onbclr(struct cda_def *lda); sword onbset(struct cda_def *lda); sword onbtst(struct cda_def *lda); sword oopen(struct cda_def *cursor,struct cda_def *lda,otext *dbn,sword dbnl,sword arsize,otext *uid,sword uidl); sword oopt(struct cda_def *cursor,sword rbopt,sword waitopt); sword orlon(struct cda_def *lda,ub1 *hda,otext *uid,sword uidl,otext *pswd,sword pswdl, sword audit); sword oparse(struct cda_def *cursor,otext *sqlstm,sb4 sqll,sword defflg,ub4 lngflg); sword opinit(ub4 mode); sword orol(struct cda_def *lda); sword osetpi(struct cda_def *cursor,sb1 piece,dvoid *bufp,ub4 *lenp); sword osql3(struct cda_def *cursor,otext *sqlstm, sword sqll); dvoid sqlld2(struct cda_def *lda,otext *cname,sb4 *cnlen); dvoid sqllda(struct cda_def *lda);const char *GetError(struct cda_def *lda, struct cda_def *cda);
private:
void Initialize(int ver = 0, char *fname = NULL);
};
#endif
//******************************* END WOCI.H ********************************* /******************************* BEGIN WOCI.CPP ********************************* A simple class to encapsulate dynamically loading the OCI... A good starting point for something more complex if you need. ********************************************************************************/
#define CHKFNPTR(p,s) if (p == NULL) {}
#define GPA(m,p,t,n,i) p = (t) GetProcAddress(m,n); \
CHKFNPTR(p,i)
WOCI::WOCI()
{
Initialize();
}
WOCI::WOCI(int ver)
{
Initialize(ver);
}
WOCI::~WOCI()
{
DeinitOCI();
}
void WOCI::Initialize(int ver, char *fname) {
o_bindps = NULL; o_bndra = NULL; o_bndrn = NULL; o_bndrv = NULL; o_break = NULL; o_can = NULL; o_close = NULL; o_cof = NULL; o_com = NULL; o_con = NULL; o_defin = NULL; o_definps = NULL; o_dsc = NULL; o_descr = NULL; o_dessp = NULL; o_erhms = NULL; o_ermsg = NULL; o_exec = NULL; o_exfet = NULL; o_exn = NULL; o_fen = NULL; o_fetch = NULL; o_flng = NULL; o_getpi = NULL; o_log = NULL; o_logof = NULL; o_lon = NULL; o_name = NULL; o_nbclr = NULL; o_nbset = NULL; o_nbtst = NULL; o_open = NULL; o_opt = NULL; o_rlon = NULL; o_parse = NULL; o_pinit = NULL; o_rol = NULL; o_setpi = NULL; o_sql3 = NULL; o_sqlld2 = NULL; o_sqllda = NULL; m_ver = InitOCI(ver);
int WOCI::InitOCI(int ver)
{
int i;
hOCI = NULL;
switch(ver) { //load an OCI interface DLL case 0: hOCI = LoadLibrary("ORA73.DLL"); i = 73; if(hOCI == NULL) { hOCI = LoadLibrary("ORA72.DLL"); i = 72; if(hOCI == NULL) { hOCI = LoadLibrary("ORANT71.DLL"); i = 71; if(hOCI == NULL) { hOCI = LoadLibrary("ORA7NT.DLL"); i = 70; } } } break; case 70: hOCI = LoadLibrary("ORA7NT.DLL"); i = 70; break; case 71: hOCI = LoadLibrary("ORANT71.DLL"); i = 71; break; case 72: hOCI = LoadLibrary("ORA72.DLL"); i = 72; break; case 73: hOCI = LoadLibrary("ORA73.DLL"); i = 73; break; } if(hOCI==NULL) return 0; ver = i; switch(ver) { //now load function entry points for OCI case 73: //piecewise manipulation extensions GPA(hOCI,o_bindps,OCI_07,SZ_OBINDPS,E_obindps) GPA(hOCI,o_definps,OCI_13,SZ_ODEFINPS,E_odefinps) GPA(hOCI,o_getpi,OCI_20,SZ_OGETPI,E_ogetpi) GPA(hOCI,o_pinit,OCI_21,SZ_OPINIT,E_opinit) GPA(hOCI,o_setpi,OCI_22,SZ_OSETPI,E_osetpi) case 72: //non-blocking extensions GPA(hOCI,o_log,OCI_01,SZ_OLOG,E_olog) GPA(hOCI,o_nbclr,OCI_04,SZ_ONBCLR,E_onbclr) GPA(hOCI,o_nbset,OCI_04,SZ_ONBSET,E_onbset) GPA(hOCI,o_nbtst,OCI_04,SZ_ONBTST,E_onbtst) case 71: //no significant changes case 70: //base GPA(hOCI,o_bndra,OCI_08,SZ_OBNDRA,E_obndra) GPA(hOCI,o_bndrn,OCI_09,SZ_OBNDRN,E_obndrn) GPA(hOCI,o_bndrv,OCI_10,SZ_OBNDRV,E_obndrv) GPA(hOCI,o_break,OCI_04,SZ_OBREAK,E_obreak) GPA(hOCI,o_can,OCI_04,SZ_OCAN,E_ocan) GPA(hOCI,o_close,OCI_04,SZ_OCLOSE,E_oclose) GPA(hOCI,o_cof,OCI_04,SZ_OCOF,E_ocof) GPA(hOCI,o_com,OCI_04,SZ_OCOM,E_ocom) GPA(hOCI,o_con,OCI_04,SZ_OCON,E_ocon) GPA(hOCI,o_defin,OCI_12,SZ_ODEFIN,E_odefin) GPA(hOCI,o_descr,OCI_14,SZ_ODESCR,E_odescr) GPA(hOCI,o_dessp,OCI_15,SZ_ODESSP,E_odessp) GPA(hOCI,o_erhms,OCI_05,SZ_OERHMS,E_oerhms) GPA(hOCI,o_exec,OCI_04,SZ_OEXEC,E_oexec) GPA(hOCI,o_exfet,OCI_16,SZ_OEXFET,E_oexfet) GPA(hOCI,o_exn,OCI_17,SZ_OEXN,E_oexn) GPA(hOCI,o_fen,OCI_18,SZ_OFEN,E_ofen) GPA(hOCI,o_fetch,OCI_04,SZ_OFETCH,E_ofetch) GPA(hOCI,o_flng,OCI_19,SZ_OFLNG,E_oflng) GPA(hOCI,o_logof,OCI_04,SZ_OLOGOF,E_ologof) GPA(hOCI,o_open,OCI_02,SZ_OOPEN,E_oopen) GPA(hOCI,o_opt,OCI_17,SZ_OOPT,E_oopt) GPA(hOCI,o_rlon,OCI_06,SZ_ORLON,E_orlon) GPA(hOCI,o_parse,OCI_03,SZ_OPARSE,E_oparse) GPA(hOCI,o_rol,OCI_04,SZ_OROL,E_orol) // GPA(hOCI,o_sqlld2,OCI_23,SZ_OSQLLD2) // GPA(hOCI,o_sqllda,OCI_24,SZ_OSQLLDA) //actually v 6 GPA(hOCI,o_sql3,OCI_29,SZ_OSQL3,E_osql3) GPA(hOCI,o_name,OCI_28,SZ_ONAME,E_oname) GPA(hOCI,o_dsc,OCI_25,SZ_ODSC,E_odsc) GPA(hOCI,o_lon,OCI_27,SZ_OLON,E_olon) GPA(hOCI,o_ermsg,OCI_26,SZ_OERMSG,E_oermsg) break; } return ver;
void WOCI::DeinitOCI()
{
o_bindps = NULL; o_bndra = NULL; o_bndrn = NULL; o_bndrv = NULL; o_break = NULL; o_can = NULL; o_close = NULL; o_cof = NULL; o_com = NULL; o_con = NULL; o_defin = NULL; o_definps = NULL; o_dsc = NULL; o_descr = NULL; o_dessp = NULL; o_erhms = NULL; o_ermsg = NULL; o_exec = NULL; o_exfet = NULL; o_exn = NULL; o_fen = NULL; o_fetch = NULL; o_flng = NULL; o_getpi = NULL; o_log = NULL; o_logof = NULL; o_lon = NULL; o_name = NULL; o_nbclr = NULL; o_nbset = NULL; o_nbtst = NULL; o_open = NULL; o_opt = NULL; o_rlon = NULL; o_parse = NULL; o_pinit = NULL; o_rol = NULL; o_setpi = NULL; o_sql3 = NULL; o_sqlld2 = NULL; o_sqllda = NULL; FreeLibrary(hOCI);
return
(o_bindps)(cursor,opcode,sqlvar,sqlvl,pvctx,progvl,ftype,scale,indp,alenp,rcodep,pv_skip,ind_skip,alen_skip,rc_skip,maxsiz,cursiz,fmt,fmtl,fmtt);
}
sword WOCI::obndra(struct cda_def *cursor,otext *sqlvar,sword
sqlvl,ub1 *progv,sword progvl,sword ftype,sword scale,sb2 *indp,ub2
*alen,ub2 *arcode,ub4 maxsiz,ub4 *cursiz,otext *fmt,sword fmtl,sword
fmtt)
{
return
(o_bndra)(cursor,sqlvar,sqlvl,progv,progvl,ftype,scale,indp,alen,arcode,maxsiz,cursiz,fmt,fmtl,fmtt);
}
sword WOCI::obndrn(struct cda_def *cursor,sword sqlvn,ub1 *progv,sword
progvl,sword ftype,sword scale,sb2 *indp,otext *fmt,sword fmtl,sword
fmtt)
{
return
(o_bndrn)(cursor,sqlvn,progv,progvl,ftype,scale,indp,fmt,fmtl,fmtt);
}
sword WOCI::obndrv(struct cda_def *cursor,otext *sqlvar,sword
sqlvl,ub1 *progv,sword progvl,sword ftype,sword scale,sb2 *indp,otext
*fmt,sword fmtl,sword fmtt)
{
return
(o_bndrv)(cursor,sqlvar,sqlvl,progv,progvl,ftype,scale,indp,fmt,fmtl,fmtt);
}
sword WOCI::obreak(struct cda_def *lda) {
return (o_break)(lda);
}
sword WOCI::ocan(struct cda_def *cursor) {
return (o_can)(cursor);
}
sword WOCI::oclose(struct cda_def *cursor) {
return (o_close)(cursor);
}
sword WOCI::ocof(struct cda_def *lda)
{
return (o_cof)(lda);
}
sword WOCI::ocom(struct cda_def *lda)
{
return (o_com)(lda);
}
sword WOCI::ocon(struct cda_def *lda)
{
return (o_con)(lda);
}
sword WOCI::odefin(struct cda_def *cursor,sword pos,ub1 *buf,sword
bufl,sword ftype,sword scale,sb2 *indp,otext *fmt,sword fmtl,sword
fmtt,ub2 *rlen,ub2 *rcode)
{
return
(o_defin)(cursor,pos,buf,bufl,ftype,scale,indp,fmt,fmtl,fmtt,rlen,rcode);
}
sword WOCI::odefinps(struct cda_def *cursor,ub1 opcode,sword pos,ub1
*bufctx,sb4 bufl,sword ftype,sword scale,sb2 *indp,otext *fmt,sb4
fmtl,sword fmtt,ub2 *rlenp,ub2 *rcodep,sb4 buf_skip,sb4 ind_skip,sb4
len_skip,sb4 rc_skip)
{
return
(o_definps)(cursor,opcode,pos,bufctx,bufl,ftype,scale,indp,fmt,fmtl,fmtt,rlenp,rcodep,buf_skip,ind_skip,len_skip,rc_skip);
}
sword WOCI::odsc(struct cda_def *cursor,sword pos,sb2 *dbsize,sb2 *fsize,
sb2 *rcode,sb2 *dbtype,otext
*cbuf,sb2 *cbufl,sb2 *dsize)
{
return
(o_dsc)(cursor,pos,dbsize,fsize,rcode,dbtype,cbuf,cbufl,dsize);
}
sword WOCI::odescr(struct cda_def *cursor,sword pos,sb4 *dbsize,sb2
*dbtype,sb1 *cbuf,sb4 *cbufl,sb4 *dsize,sb2 *prec,sb2 *scale,sb2
*nullok)
{
return
(o_descr)(cursor,pos,dbsize,dbtype,cbuf,cbufl,dsize,prec,scale,nullok);
}
sword WOCI::odessp(struct cda_def *lda,otext *objnam,size_t onlen,ub1
*rsv1,size_t rsv1ln,ub1 *rsv2,size_t rsv2ln,ub2 *ovrld,ub2 *pos,ub2 *level,otext **argnm,ub2 *arnlen,ub2 *dtype,ub1 *defsup,ub1 *mode,ub4 *dtsiz,sb2 *prec,sb2 *scale,ub1 *radix,ub4 *spare,ub4 *arrsiz) { return
sword WOCI::oerhms(struct cda_def *lda,sb2 rcode,otext *buf,sword
bufsiz)
{
return (o_erhms)(lda,rcode,buf,bufsiz); }
sword WOCI::oermsg(ub2 rcode,otext *msg) {
return (o_ermsg)(rcode,msg);
}
sword WOCI::oexec(struct cda_def *cursor) {
return (o_exec)(cursor);
}
sword WOCI::oexfet(struct cda_def *cursor,ub4 nrows,sword cancel,sword
exact)
{
return (o_exfet)(cursor,nrows,cancel,exact); }
sword WOCI::oexn(struct cda_def *cursor,sword iters,sword rowoff) {
return (o_exn)(cursor,iters,rowoff);
}
sword WOCI::ofen(struct cda_def *cursor,sword nrows) {
return (o_fen)(cursor,nrows);
}
sword WOCI::ofetch(struct cda_def *cursor) {
return (o_fetch)(cursor);
}
sword WOCI::oflng(struct cda_def *cursor,sword pos,ub1 *buf,sb4
bufl,sword dtype,ub4 *retl,sb4 offset)
{
return (o_flng)(cursor,pos,buf,bufl,dtype,retl,offset); }
sword WOCI::ogetpi(struct cda_def *cursor,sb1 *piecep,dvoid
**ctxpp,eword *iterp,eword *indexp)
{
return (o_getpi)(cursor,piecep,ctxpp,iterp,indexp); }
sword WOCI::olog(struct cda_def *lda,ub1 *hda,otext *uid,sword uidl,otext *pswd,sword pswdl,otext *conn, sword connl, ub4 mode) {
return (o_log)(lda,hda,uid,uidl,pswd,pswdl,conn,connl,mode); }
sword WOCI::ologof(struct cda_def *lda) {
return (o_logof)(lda);
}
sword WOCI::olon(struct cda_def *lda,otext *uid, sword uidl, otext
*pswd,sword pswdl, sword audit)
{
return (o_lon)(lda,uid,uidl,pswd,pswdl,audit); }
sword WOCI::oname(struct cda_def *cursor,sword pos,sb1 *tbuf,sb2
*tubfl,sb1 *cbuf,sb2 *cbufl)
{
return (o_name)(cursor,pos,tbuf,tubfl,cbuf,cbufl); }
sword WOCI::onbclr(struct cda_def *lda) {
return (o_nbclr)(lda);
}
sword WOCI::onbset(struct cda_def *lda) {
return (o_nbset)(lda);
}
sword WOCI::onbtst(struct cda_def *lda) {
return (o_nbtst)(lda);
}
sword WOCI::oopen(struct cda_def *cursor,struct cda_def *lda,otext *dbn,sword dbnl,sword arsize,otext *uid,sword uidl) {
return (o_open)(cursor,lda,dbn,dbnl,arsize,uid,uidl); }
sword WOCI::oopt(struct cda_def *cursor,sword rbopt,sword waitopt) {
return (o_opt)(cursor,rbopt,waitopt);
}
sword WOCI::orlon(struct cda_def *lda,ub1 *hda,otext *uid,sword uidl,otext *pswd,sword pswdl, sword audit) {
return (o_rlon)(lda,hda,uid,uidl,pswd,pswdl,audit); }
sword WOCI::oparse(struct cda_def *cursor,otext *sqlstm,sb4 sqll,sword
defflg,ub4 lngflg)
{
return (o_parse)(cursor,sqlstm,sqll,defflg,lngflg); }
sword WOCI::opinit(ub4 mode)
{
return (o_pinit)(mode);
}
sword WOCI::orol(struct cda_def *lda)
{
return (o_rol)(lda);
}
sword WOCI::osetpi(struct cda_def *cursor,sb1 piece,dvoid *bufp,ub4
*lenp)
{
return (o_setpi)(cursor,piece,bufp,lenp); }
sword WOCI::osql3(struct cda_def *cursor,otext *sqlstm, sword sqll) {
return (o_sql3)(cursor,sqlstm,sqll);
}
dvoid WOCI::sqlld2(struct cda_def *lda,otext *cname,sb4 *cnlen) {
(o_sqlld2)(lda,cname,cnlen);
}
dvoid WOCI::sqllda(struct cda_def *lda) {
(o_sqllda)(lda);
}
const char *WOCI::GetError(struct cda_def *lda, struct cda_def *cda) {
memset(m_msg,0,512); oerhms(lda, cda->rc, (unsigned char *)m_msg, (sizeof(m_msg)-1)); return m_msg;
#undef CHKFNPTR
#undef GPA
//******************************* END WOCI.CPP *********************************Received on Wed Jun 24 1998 - 09:08:41 CDT