⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdora.hpp

📁 SQLDirect Component Library is a light-weight Borland Database Engine replacement for Borland Delphi
💻 HPP
📖 第 1 页 / 共 5 页
字号:
	
public:
	__fastcall TIOra8LobParams(TIOra8Database* ASqlDatabase)/* overload */;
	__fastcall TIOra8LobParams(void * ABindLobPtr)/* overload */;
	__fastcall virtual ~TIOra8LobParams(void);
	void * __fastcall GetAddrLobLen(int iRow, int iCol);
	POCILobLocator __fastcall GetLobLocator(int iRow, int iCol);
	void __fastcall SetLobLocator(int iRow, int iCol, POCILobLocator Value);
	void __fastcall SetLobArraySize(int ARows, int ACols);
	__property TBindLobInfo BindInfo[int Index] = {read=GetBindInfo, write=SetBindInfo};
	__property void * BindLobPtr = {read=FBindLobPtr};
	__property POCIEnv EnvPtr = {read=GetEnvPtr};
	__property POCIError ErrPtr = {read=GetErrPtr};
	__property int ColCount = {read=GetColCount, nodefault};
	__property int RowCount = {read=GetRowCount, nodefault};
};


class DELPHICLASS TIOra8Command;
class PASCALIMPLEMENTATION TIOra8Command : public Sdcommon::TISqlCommand 
{
	typedef Sdcommon::TISqlCommand inherited;
	
private:
	void * *FHandle;
	AnsiString FStmt;
	void * *FParamHandle;
	bool FBoundParams;
	bool FIsGetFieldDescs;
	bool FIsCursorParamExists;
	TIOra8LobParams* FBindLobs;
	POCIError __fastcall GetErrPtr(void);
	POCISvcCtx __fastcall GetSvcPtr(void);
	HIDESBASE TIOra8Database* __fastcall GetSqlDatabase(void);
	int __fastcall GetStmtExecuteMode(void);
	bool __fastcall GetTempLobSupported(void);
	void __fastcall Connect(void);
	void __fastcall CloseParamHandle(void);
	bool __fastcall IsFileLocDataType(int ExtDataType);
	bool __fastcall IsOra8BlobDataType(int ExtDataType);
	bool __fastcall IsOra8BlobType(Db::TFieldType ADataType);
	bool __fastcall IsPLSQLBlock(void);
	bool __fastcall IsSelectStmt(void);
	void __fastcall ClearFieldsExtraData(void);
	bool __fastcall IsInterval(Sdcommon::TSDFieldDesc* FieldDesc);
	bool __fastcall IsOra9DateTime(int ExtDataType);
	int __fastcall GetOCIDateTimeDesc(int ExtDataType);
	Db::TDateTimeRec __fastcall Ora9CnvtDBDateTime2DateTimeRec(Sdcommon::TSDFieldDesc* AFieldDesc, char * Buffer, int BufSize);
	System::Currency __fastcall Ora9CnvtDBInterval2Currency(Sdcommon::TSDFieldDesc* AFieldDesc, char * Buffer, int BufSize);
	void __fastcall SetOCIDateTime(Db::TFieldType FieldType, System::TDateTime Value, POCIDateTime phDateTime);
	void __fastcall WriteLobParams(void);
	void __fastcall InternalExecute(void);
	void __fastcall InternalGetParams(void);
	void __fastcall QBindParamsBuffer(void);
	void __fastcall SpBindParamsBuffer(void);
	
protected:
	void __fastcall Check(short Status);
	void __fastcall CheckStmt(short Status);
	virtual int __fastcall CnvtDateTime2DBDateTime(Db::TFieldType ADataType, System::TDateTime Value, char * Buffer, int BufSize);
	virtual Db::TFieldType __fastcall FieldDataType(int ExtDataType);
	virtual Word __fastcall NativeDataSize(Db::TFieldType FieldType);
	virtual int __fastcall NativeDataType(Db::TFieldType FieldType);
	virtual bool __fastcall RequiredCnvtFieldType(Db::TFieldType FieldType);
	virtual void __fastcall DoPrepare(AnsiString Value);
	virtual void __fastcall DoExecDirect(AnsiString Value);
	virtual void __fastcall DoExecute(void);
	virtual void __fastcall GetFieldDescs(Sdcommon::TSDFieldDescList* Descs);
	virtual void * __fastcall GetHandle(void);
	virtual void __fastcall InitParamList(void);
	virtual void __fastcall BindParamsBuffer(void);
	virtual void __fastcall FreeParamsBuffer(void);
	virtual void __fastcall FreeFieldsBuffer(void);
	virtual void __fastcall SetFieldsBuffer(void);
	int __fastcall GetLobType(Db::TBlobType BlobType, bool IsTempLob);
	int __fastcall ReadHLobField(Sdcommon::TSDFieldDesc* AFieldDesc, Sdcommon::TBytes &BlobData);
	int __fastcall ReadLobData(POCILobLocator phLob, Sdcommon::TBytes &BlobData);
	int __fastcall WriteLobData(POCILobLocator phLob, const char * Buffer, int Count);
	__property POCIError ErrPtr = {read=GetErrPtr};
	__property POCISvcCtx SvcPtr = {read=GetSvcPtr};
	__property bool TempLobSupported = {read=GetTempLobSupported, nodefault};
	
public:
	__fastcall virtual TIOra8Command(Sdcommon::TISqlDatabase* ASqlDatabase);
	__fastcall virtual ~TIOra8Command(void);
	virtual void __fastcall CloseResultSet(void);
	virtual void __fastcall Disconnect(bool Force);
	virtual void __fastcall Execute(void);
	virtual int __fastcall GetRowsAffected(void);
	virtual bool __fastcall ResultSetExists(void);
	virtual bool __fastcall FetchNextRow(void);
	virtual bool __fastcall GetCnvtFieldData(Sdcommon::TSDFieldDesc* AFieldDesc, void * Buffer, int BufSize);
	virtual void __fastcall GetOutputParams(void);
	virtual int __fastcall ReadBlob(Sdcommon::TSDFieldDesc* AFieldDesc, Sdcommon::TBytes &BlobData);
	virtual int __fastcall WriteBlob(int FieldNo, const char * Buffer, int Count);
	virtual int __fastcall WriteBlobByName(AnsiString Name, const char * Buffer, int Count);
	__property TIOra8Database* SqlDatabase = {read=GetSqlDatabase};
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint FetRTru = 0x1;
static const Shortint FetRSin = 0x2;
static const Shortint FetRDnn = 0x3;
static const Shortint FetRNof = 0x4;
static const Shortint FetRDtn = 0x5;
static const Shortint FetRDnd = 0x6;
static const Shortint FetRNul = 0xffffffff;
static const Shortint CHAR_BIT = 0x8;
static const Shortint SCHAR_MIN = 0xffffff80;
static const Shortint SCHAR_MAX = 0x7f;
static const Byte UCHAR_MAX = 0xff;
static const Shortint CHAR_MIN = 0x0;
static const Byte CHAR_MAX = 0xff;
static const Shortint MB_LEN_MAX = 0x2;
static const short SHRT_MIN = 0xffff8000;
static const Word SHRT_MAX = 0x7fff;
static const Word USHRT_MAX = 0xffff;
static const int INT_MIN = 0x80000000;
static const int INT_MAX = 0x7fffffff;
static const unsigned UINT_MAX = 0xffffffff;
static const int LONG_MIN = 0x80000000;
static const int LONG_MAX = 0x7fffffff;
static const unsigned ULONG_MAX = 0xffffffff;
static const int EWORDMAXVAL = 0x7fffffff;
static const Shortint EWORDMINVAL = 0x0;
static const unsigned UWORDMAXVAL = 0xffffffff;
static const Shortint UWORDMINVAL = 0x0;
static const int SWORDMAXVAL = 0x7fffffff;
static const int SWORDMINVAL = 0x80000000;
static const Word MINEWORDMAXVAL = 0x7fff;
static const Shortint MAXEWORDMINVAL = 0x0;
static const Word MINUWORDMAXVAL = 0xffff;
static const Shortint MAXUWORDMINVAL = 0x0;
static const Word MINSWORDMAXVAL = 0x7fff;
static const short MAXSWORDMINVAL = 0xffff8001;
static const Shortint EB1MAXVAL = 0x7f;
static const Shortint EB1MINVAL = 0x0;
static const Byte UB1MAXVAL = 0xff;
static const Shortint UB1MINVAL = 0x0;
static const Shortint SB1MAXVAL = 0x7f;
static const Shortint SB1MINVAL = 0xffffff80;
static const Shortint MINEB1MAXVAL = 0x7f;
static const Shortint MAXEB1MINVAL = 0x0;
static const Byte MINUB1MAXVAL = 0xff;
static const Shortint MAXUB1MINVAL = 0x0;
static const Shortint MINSB1MAXVAL = 0x7f;
static const Shortint MAXSB1MINVAL = 0xffffff81;
static const Shortint UB1BITS = 0x8;
static const Byte UB1MASK = 0xff;
static const Word EB2MAXVAL = 0x7fff;
static const Shortint EB2MINVAL = 0x0;
static const Word UB2MAXVAL = 0xffff;
static const Shortint UB2MINVAL = 0x0;
static const Word SB2MAXVAL = 0x7fff;
static const short SB2MINVAL = 0xffff8000;
static const Word MINEB2MAXVAL = 0x7fff;
static const Shortint MAXEB2MINVAL = 0x0;
static const Word MINUB2MAXVAL = 0xffff;
static const Shortint MAXUB2MINVAL = 0x0;
static const Word MINSB2MAXVAL = 0x7fff;
static const short MAXSB2MINVAL = 0xffff8001;
static const int EB4MAXVAL = 0x7fffffff;
static const Shortint EB4MINVAL = 0x0;
static const unsigned UB4MAXVAL = 0xffffffff;
static const Shortint UB4MINVAL = 0x0;
static const int SB4MAXVAL = 0x7fffffff;
static const int SB4MINVAL = 0x80000000;
static const int MINEB4MAXVAL = 0x7fffffff;
static const Shortint MAXEB4MINVAL = 0x0;
static const unsigned MINUB4MAXVAL = 0xffffffff;
static const Shortint MAXUB4MINVAL = 0x0;
static const int MINSB4MAXVAL = 0x7fffffff;
static const int MAXSB4MINVAL = 0x80000001;
static const unsigned UBIG_ORAMAXVAL = 0xffffffff;
static const Shortint UBIG_ORAMINVAL = 0x0;
static const int SBIG_ORAMAXVAL = 0x7fffffff;
static const int SBIG_ORAMINVAL = 0x80000000;
static const int MINUBIG_ORAMAXVAL = 0x7fffffff;
static const Shortint MAXUBIG_ORAMINVAL = 0x0;
static const int MINSBIG_ORAMAXVAL = 0x7fffffff;
static const int MAXSBIG_ORAMINVAL = 0x80000001;
static const unsigned SIZE_TMAXVAL = 0xffffffff;
static const Word MINSIZE_TMAXVAL = 0xffff;
static const int SizeOfPtr = 0x4;
static const Shortint CDA_SIZE = 0x40;
static const Shortint LDA_SIZE = 0x40;
static const Word HDA_SIZE = 0x100;
static const int CDA_HEAD_SIZE = 0x30;
static const Shortint OCI_EV_DEF = 0x0;
static const Shortint OCI_EV_TSF = 0x1;
static const Shortint OCI_LM_DEF = 0x0;
static const Shortint OCI_LM_NBL = 0x1;
static const Shortint OCI_ONE_PIECE = 0x0;
static const Shortint OCI_FIRST_PIECE = 0x1;
static const Shortint OCI_NEXT_PIECE = 0x2;
static const Shortint OCI_LAST_PIECE = 0x3;
static const Shortint SQLT_CHR = 0x1;
static const Shortint SQLT_NUM = 0x2;
static const Shortint SQLT_INT = 0x3;
static const Shortint SQLT_FLT = 0x4;
static const Shortint SQLT_STR = 0x5;
static const Shortint SQLT_VNU = 0x6;
static const Shortint SQLT_PDN = 0x7;
static const Shortint SQLT_LNG = 0x8;
static const Shortint SQLT_VCS = 0x9;
static const Shortint SQLT_NON = 0xa;
static const Shortint SQLT_RID = 0xb;
static const Shortint SQLT_DAT = 0xc;
static const Shortint SQLT_VBI = 0xf;
static const Shortint SQLT_BIN = 0x17;
static const Shortint SQLT_LBI = 0x18;
static const Shortint SQLT_UIN = 0x44;
static const Shortint SQLT_SLS = 0x5b;
static const Shortint SQLT_LVC = 0x5e;
static const Shortint SQLT_LVB = 0x5f;
static const Shortint SQLT_AFC = 0x60;
static const Shortint SQLT_AVC = 0x61;
static const Shortint SQLT_CUR = 0x66;
static const Shortint SQLT_RDD = 0x68;
static const Shortint SQLT_LAB = 0x69;
static const Shortint SQLT_OSL = 0x6a;
static const Shortint SQLT_NTY = 0x6c;
static const Shortint SQLT_REF = 0x6e;
static const Shortint SQLT_CLOB = 0x70;
static const Shortint SQLT_BLOB = 0x71;
static const Shortint SQLT_BFILE = 0x72;
static const Shortint SQLT_CFILE = 0x73;
static const Shortint SQLT_RSET = 0x74;
static const Shortint SQLT_NCO = 0x7a;
static const Byte SQLT_VST = 0x9b;
static const Byte SQLT_ODT = 0x9c;
static const Byte SQLT_DATE = 0xb8;
static const Byte SQLT_TIME = 0xb9;
static const Byte SQLT_TIME_TZ = 0xba;
static const Byte SQLT_TIMESTAMP = 0xbb;
static const Byte SQLT_TIMESTAMP_TZ = 0xbc;
static const Byte SQLT_INTERVAL_YM = 0xbd;
static const Byte SQLT_INTERVAL_DS = 0xbe;
static const Byte SQLT_TIMESTAMP_LTZ = 0xe8;
static const Byte SQLT_PNTY = 0xf1;
static const Shortint SQLCS_IMPLICIT = 0x1;
static const Shortint SQLCS_NCHAR = 0x2;
static const Shortint SQLCS_EXPLICIT = 0x3;
static const Shortint SQLCS_FLEXIBLE = 0x4;
static const Shortint SQLCS_LIT_NULL = 0x5;
extern PACKAGE int __cdecl (*obindps)(PCdaDef cursor, Byte opcode, char * sqlvar, int sqlvl, void * pvctx, int progvl, int ftype, int scale, ub2p ind, ub2p alen, ub2p arcode, int pv_skip, int ind_skip, int alen_skip, int rc_skip, int maxsiz, ub4p cursiz, char * fmt, int fmtl, int fmtt);
extern PACKAGE int __cdecl (*obreak)(PCdaDef ldaptr);
extern PACKAGE int __cdecl (*ocan)(PCdaDef cursor);
extern PACKAGE int __cdecl (*oclose)(PCdaDef cursor);
extern PACKAGE int __cdecl (*ocof)(PCdaDef ldaptr);
extern PACKAGE int __cdecl (*ocom)(PCdaDef ldaptr);
extern PACKAGE int __cdecl (*ocon)(PCdaDef ldaptr);
extern PACKAGE int __cdecl (*odefinps)(PCdaDef cursor, Byte opcode, int pos, char * bufctx, int bufl, int ftype, int scale, sb2p indp, char * fmt, int fmtl, int fmtt, ub2p rlen, ub2p rcode, int pv_skip, int ind_skip, int alen_skip, int rc_skip);
extern PACKAGE int __cdecl (*odessp)(PCdaDef cursor, char * objnam, int onlen, ub1p rsv1, int rsv1ln, ub1p rsv2, int rsv2ln, ub2p ovrld, ub2p pos, ub2p level, char * text, ub2p arnlen, ub2p dtype, ub1p defsup, ub1p mode, ub4p dtsiz, sb2p prec, sb2p scale, ub1p radix, ub4p spare, int &arrsiz);
extern PACKAGE int __cdecl (*odescr)(PCdaDef cursor, int pos, int &dbsize, short &dbtype, char * cbuf, int &cbufl, int &dsize, short &prec, short &scale, short &nullok);
extern PACKAGE int __cdecl (*oerhms)(PLdaDef ldaptr, short rcode, char * buf, int bufsiz);
extern PACKAGE int __cdecl (*oermsg)(short rcode, char * buf);
extern PACKAGE int __cdecl (*oexec)(PCdaDef cursor);
extern PACKAGE int __cdecl (*oexfet)(PCdaDef cursor, int nrows, int cancel, int exact);
extern PACKAGE int __cdecl (*oexn)(PCdaDef cursor, int iters, int rowoff);
extern PACKAGE int __cdecl (*ofen)(PCdaDef cursor, int nrows);
extern PACKAGE int __cdecl (*ofetch)(PCdaDef cursor);
extern PACKAGE int __cdecl (*oflng)(PCdaDef cursor, int pos, char * buf, int bufl, int dtype, int &retl, int offset);
extern PACKAGE int __cdecl (*ogetpi)(PCdaDef cursor, Byte &piece, void * &ctxp, int &iter, int &index);
extern PACKAGE int __cdecl (*oopt)(PCdaDef cursor, int rbopt, int waitopt);
extern PACKAGE int __cdecl (*opinit)(int mode);
extern PACKAGE int __cdecl (*olog)(PLdaDef ldaptr, PHdaDef hdaptr, char * uid, int uidl, char * pswd, int pswdl, char * conn, int connl, int mode);
extern PACKAGE int __cdecl (*ologof)(PLdaDef ldaptr);
extern PACKAGE int __cdecl (*oopen)(PCdaDef cursor, PCdaDef ldaptr, char * dbn, int dbnl, int arsize, char * uid, int uidl);
extern PACKAGE int __cdecl (*oparse)(PCdaDef cursor, char * sqlstm, int sqllen, int defflg, int lngflg);
extern PACKAGE int __cdecl (*orol)(PCdaDef ldaptr);
extern PACKAGE int __cdecl (*osetpi)(PCdaDef cursor, Byte piece, void * bufp, int &len);
extern PACKAGE int __cdecl (*onbset)(PCdaDef ldaptr);
extern PACKAGE int __cdecl (*onbtst)(PCdaDef ldaptr);
extern PACKAGE int __cdecl (*onbclr)(PCdaDef ldaptr);
extern PACKAGE int __cdecl (*obndra)(PCdaDef cursor, char * sqlvar, int sqlvl, char * progv, int progvl, int ftype, int scale, sb2p indp, ub2p alen, ub2p arcode, int maxsiz, ub4p cursiz, char * fmt, int fmtl, int fmtt);
extern PACKAGE int __cdecl (*obndrn)(PCdaDef cursor, int sqlvn, char * progv, int progvl, int ftype, int scale, sb2p indp, char * fmt, int fmtl, int fmtt);
extern PACKAGE int __cdecl (*obndrv)(PCdaDef cursor, char * sqlvar, int sqlvl, char * progv, int progvl, int ftype, int scale, sb2p indp, char * fmt, int fmtl, int fmtt);
extern PACKAGE int __cdecl (*odefin)(PCdaDef cursor, int pos, char * buf, int bufl, int ftype, int scale, sb2p indp, char * fmt, int fmtl, int fmtt, ub2p rlen, ub2p rcode);
static const Word MAXERRMSG = 0x3e8;
static const Shortint DEFERRED_PARSE = 0x1;
static const Shortint ORACLE7_PARSE = 0x2;
static const Shortint ORA_CT_CTB = 0x1;
static const Shortint ORA_CT_SRL = 0x2;
static const Shortint ORA_CT_INS = 0x3;
static const Shortint ORA_CT_SEL = 0x4;
static const Shortint ORA_CT_UPD = 0x5;
static const Shortint ORA_CT_DRL = 0x6;
static const Shortint ORA_CT_DVW = 0x7;
static const Shortint ORA_CT_DTB = 0x8;
static const Shortint ORA_CT_DEL = 0x9;
static const Shortint ORA_CT_CVW = 0xa;
static const Shortint ORA_CT_DUS = 0xb;
static const Shortint ORA_CT_CRL = 0xc;
static const Shortint ORA_CT_CSQ = 0xd;
static const Shortint ORA_CT_ASQ = 0xe;
static const Shortint ORA_CT_DSQ = 0x10;
static const Shortint ORA_CT_CSC = 0x11;
static const Shortint ORA_CT_CCL = 0x12;
static const Shortint ORA_CT_CUS = 0x13;
static const Shortint ORA_CT_CIN = 0x14;
static const Shortint ORA_CT_DIN = 0x15;
static const Shortint ORA_CT_DCL = 0x16;
static const Shortint ORA_CT_VIN = 0x17;
static const Shortint ORA_CT_CPR = 0x18;
static const Shortint ORA_CT_APR = 0x19;
static const Shortint ORA_CT_ATB = 0x1a;
static const Shortint ORA_CT_EXP = 0x1b;
static const Shortint ORA_CT_GRT = 0x1c;
static const Shortint ORA_CT_RVK = 0x1d;
static const Shortint ORA_CT_CSY = 0x1e;
static const Shortint ORA_CT_DSY = 0x1f;
static const Shortint ORA_CT_STR = 0x21;
static const Shortint ORA_CT_PEX = 0x22;
static const Shortint ORA_CT_LTB = 0x23;
static const Shortint ORA_CT_REN = 0x25;
static const Shortint ORA_CT_COM = 0x26;
static const Shortint ORA_CT_AUD = 0x27;
static const Shortint ORA_CT_NAU = 0x28;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -