/* SQLSYS_O.H - 08 11 1990 system dependend #defines and declarations for the SQLSVR class ORACLE server */ #ifndef _SQLSYS_INCLUDED #define _SQLSYS_INCLUDED 1 #include #include struct csrdef { short csrrc; /* return code */ short csrft; /* function type */ unsigned long csrrpc; /* rows processed count */ short csrpeo; /* parse error offset */ unsigned char csrfc; /* function code */ unsigned char csrfil; /* filler */ unsigned short csrarc; /* reserved, private */ unsigned char csrwrn; /* warning flags */ unsigned char csrflg; /* error flags */ /* *** Operating system dependent *** */ unsigned int csrcn; /* cursor number */ struct { /* rowid structure */ struct { unsigned long tidtrba; /* rba of first blockof table */ unsigned short tidpid; /* partition id of table */ unsigned char tidtbl; /* table id of table */ } ridtid; unsigned long ridbrba; /* rba of datablock */ unsigned short ridsqn; /* sequence number of row in block */ } csrrid; unsigned int csrose; /* os dependent error code */ unsigned char csrchk; /* check byte */ unsigned char crsfill[30]; /* private, reserved fill */ }; extern "C" { extern int orlon(csrdef*, char*, char*, int, char*, int, int); extern int oopen(csrdef*, csrdef*, char*, int, int, char*, int); extern int osql3(csrdef*, char*, int); extern int odsc(csrdef*, int, short*, short*, short*, short*, char*, short*, short*); extern int odefin(csrdef*, int, char*, int, int, int, short*, char*, int, int, short*, short*); extern int obndrn(csrdef*, int, char*, int, int, int, short*, char*, int, int); extern int obndrv(csrdef*, char*, int, char*, int, int, int, short*, char*, int, int); extern int oexec(csrdef*); extern int ofetch(csrdef*); extern int ocom(csrdef*); extern int orol(csrdef*); extern int oermsg(short, char*); extern int oclose(csrdef*); extern int ologof(csrdef*); } #define ORA_MAXCURSORS 10 /* house number... */ #define ORA_DEFINSZ 0 #define ORA_DEFOUTSZ 0 #define ORA_DEFCURSZ -1 #define ORA_MAX_SYSTYPES 17 /* all cb system types (SQLPDTM + 2) */ #define ORA_MAX_ERRTXTLEN 132 /* max error text length */ #define ORA_MAX_COLNAMELEN 50 /* max column name length */ /* Oracle program data types */ #define ORA_PBUFFER 1 /* char* or void* buffer */ #define ORA_PSTR 5 /* char* (\0 terminated) */ #define ORA_PUCHAR 3 /* unsigned char */ #define ORA_PCHAR 3 /* char */ #define ORA_PUINT 3 /* unsigned int */ #define ORA_PINT 3 /* int */ #define ORA_PULONG 3 /* unsigned long */ #define ORA_PLONG 3 /* long */ #define ORA_PFLOAT 4 /* float */ #define ORA_PDOUBLE 4 /* double */ #define ORA_PROWID 1 /* 11 binary ROWID does not work -- why? */ /* 18 ? bytes buffer */ #define ORA_PRECNO 11 /* 13 or better 16 ? bytes buffer */ #define ORA_PDATE 12 /* 7 or better 8 bytes buffer */ #define ORA_PLSTRING 8 /* LONG string type */ #define ORA_PLSTREAM 8 /* LONG stream type */ extern short* pdlen; extern int* pdtype; void init_sys_data(); #endif