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

📄 sdcsb.pas

📁 SQLDirect Component Library is a light-weight Borland Database Engine replacement for Borland Delphi
💻 PAS
📖 第 1 页 / 共 5 页
字号:
  SQLORDWR	= $0002;		// open for reading and writing
  SQLOAPPEND	= $0008;		// writes done at eof
  SQLOCREAT	= $0100;		// create and open file
  SQLOTRUNC	= $0200;		// open and truncate
  SQLOEXCL	= $0400;		// open if file doesn't exist
  SQLODIRCREA	= $0800;		// create directory if doesn't exist
  SQLOTEXT	= $4000;		// file mode is text
  SQLOBINARY	= $8000;		// file mode is binary

	{ 	server information flags 	}
  SQLGPWD	= $01;		// send password
  SQLGCUR	= $02;		// cursor information
  SQLGDBS  	= $04;		// database information
  SQLGCFG  	= $08;		// configuration information
  SQLGSTT  	= $10;		// statistics
  SQLGPRC  	= $20;		// process information

type
	{ 	message header 		}
  THdrDefx = record
    hdrlen :ubyte2;		// message length (including hdr)
    hdrrsv :ubyte2;		// reserved
  end;
  THdrDef = THdrDefx;
  PHdrDef = ^THdrDef;

	{ 	message section header 	}
  TMshDefx = record
    mshflg :ubyte2;		// section data type
    mshten :ubyte2;		// total # of entries available
    mshnen :ubyte2;		// # of entries contained in msg
    mshlen :ubyte2;		// # of data bytes in msg section
     				// (including this header)
  end;
  TMshDef = TMshDefx;
  PMshDef = ^TMshDef;

	{ 	cursor information	}
  TCurDefx = record
    currow :ubyte4;			// number of rows
    curibl :ubyte2;			// input buffer
    curobl :ubyte2;			// output message buffer length
    curspr :ubyte2;			// stat counter, physical reads
    curspw :ubyte2;			// stat counter, physical writes
    cursvr :ubyte2;			// stat counter, virtual reads
    cursvw :ubyte2;			// stat counter, virtual writes
    curtyp :ubyte1;			// command type
    curpnm :ubyte1;			// process number
    curiso :array[0..2] of Char; 	// locking isolation
    curunb :array[0..18] of Char;	// user name buffer
    curdbn :array[0..8] of Char;	// database name
    currsv :array[0..2] of Char;	// reserved
  end;
  TCurDef = TCurDefx;
  PCurDef = ^TCurDef;

	{ 	database information 	}
  TDbsDefx = record
    dbsbfs :ubyte4;			// before image file size
    dbsbwp :ubyte4;			// before image write page
    dbsdfs :ubyte4;			// database file size
    dbsfrp :ubyte4;			// 1st reader page in circular log
    dbsfup :ubyte4;			// 1st updater page in circular log
    dbslpa :ubyte4;			// last page allocated
    dbslpm :ubyte4;			// log page maximum
    dbslpt :ubyte4;			// log page threshold
    dbslpw :ubyte4;			// last page written
    dbsltp :ubyte4;			// last temporary page accessed
    dbsltw :ubyte4;			// last temporary page written
    dbsuse :ubyte1;			// use count
    dbsnat :ubyte1;			// number of active transactions
    dbsntr :ubyte1;			// number of transactions
    dbsfnm :array[0..8] of Char;	// database file name
  end;
  TDbsDef = TDbsDefx;
  PDbsDef = ^TDbsDef;

	{ 	configuration information 	}
  TCfgDefx = record
    cfgwsa :ubyte4;			// work space allocation size
    cfgwsl :ubyte4;			// work space limit
    cfgnlk :ubyte2;			// number of locks
    cfgnpg :ubyte2;			// number of pages
    cfgcnc :ubyte2;			// connect count
    cfgsvn :array[0..8] of Char;	// server name
    cfgrsv :ubyte1;			// reserved
  end;
  TCfgDef = TCfgDefx;
  PCfgDef = ^TCfgDef;

	{ 	statistics 	}
  TSttDefx = record
    sttspr :ubyte4;		// physical reads
    sttspw :ubyte4;		// physical writes
    sttsvr :ubyte4;		// virtual reads
    sttsvw :ubyte4;		// virtual writes
    sttnps :ubyte4;		// number of process switches
  end;
  TSttDef = TSttDefx;
  PSttDef = ^TSttDef;

	{ 	process information 	}
  TPrcDefx = record
    prccol :ubyte2;		// current output message length
    prcibl :ubyte2;		// input message buffer length
    prcinl :ubyte2;		// input length
    prcobl :ubyte2;		// output message buffer length
    prcoul :ubyte2;		// output length
    prcpnm :ubyte1;		// process number
    prcact :ubyte1;		// active flag
  end;
  TPrcDef = TPrcDefx;
  PPrcDef = ^TPrcDef;



{*******************************************************************************
			Sql FUNCTION PROTOTYPES
********************************************************************************}
// call convention
//#  define SQLTAPI byte2 __stdcall	/* 32-bit non-OS/2 uses __stdcall   */
{$IFNDEF SD_CLR}
var
  SqlArf: function(Cur: SQLTCUR; fnp: SQLTFNP; fnl: SQLTFNL; cho: SQLTCHO): SqlTAPI; stdcall;
  SqlBbr: function(Cur: SQLTCUR; errno: SQLTXERPTR; errbuf: SQLTDAP; buflen: SQLTDALPTR;
	        errrow: SQLTBIRPTR; rbf: SQLTRBFPTR; errseq: SQLTBIR): SqlTAPI; stdcall;
  SqlBdb: function(shandle: SQLTSVH; dbname: SQLTDAP; dbnamel: SQLTDAL;
		bkpdir: SQLTFNP; bkpdirl: SQLTFNL; local: SQLTBOO; over: SQLTBOO): SqlTAPI; stdcall;
  SqlBef: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlBer: function(Cur: SQLTCUR; rcd: SQLTRCDPTR; errrow: SQLTBIRPTR;
		rbf: SQLTRBFPTR; errseq: SQLTBIR): SqlTAPI; stdcall;
  SqlBkp: function(Cur: SQLTCUR; defalt: SQLTBOO; overwrt: SQLTBOO;
		bkfname: SQLTFNP; bkflen: SQLTFNL): SqlTAPI; stdcall;
  SqlBld: function(Cur: SQLTCUR; bnp: SQLTBNP; bnl: SQLTBNL): SqlTAPI; stdcall;
  SqlBlf: function(shandle: SQLTSVH; dbname: SQLTDAP; dbnamel: SQLTDAL;
		bkpdir: SQLTFNP; bkpdirl: SQLTFNL; local: SQLTBOO; over: SQLTBOO): SqlTAPI; stdcall;
  SqlBlk: function(Cur: SQLTCUR; blkflg: SQLTFLG): SqlTAPI; stdcall;
  SqlBln: function(Cur: SQLTCUR; bnn: SQLTBNN): SqlTAPI; stdcall;
  SqlBna: function(Cur: SQLTCUR; bnp: SQLTBNP; bnl: SQLTBNL; dap: SQLTDAP; dal: SQLTDAL;
		sca: SQLTSCA; pdt: SQLTPDT; nli: SQLTNUL): SqlTAPI; stdcall;
  SqlBnd: function(Cur: SQLTCUR; bnp: SQLTBNP; bnl: SQLTBNL; dap: SQLTDAP; dal: SQLTDAL;
		sca: SQLTSCA; pdt: SQLTPDT): SqlTAPI; stdcall;
  SqlBnn: function(Cur: SQLTCUR; bnn: SQLTBNN; dap: SQLTDAP; dal: SQLTDAL;
	        sca: SQLTSCA; pdt: SQLTPDT): SqlTAPI; stdcall;
  SqlBnu: function(Cur: SQLTCUR; bnn: SQLTBNN; dap: SQLTDAP; dal: SQLTDAL;
	        sca: SQLTSCA; pdt: SQLTPDT; nli: SQLTNUL): SqlTAPI; stdcall;
  SqlBss: function(shandle: SQLTSVH; dbname: SQLTDAP; dbnamel: SQLTDAL;
		bkpdir: SQLTFNP; bkpdirl: SQLTFNL; local: SQLTBOO; over: SQLTBOO): SqlTAPI; stdcall;
  SqlCan: function(Cur: SqlTCUR): SqlTAPI; stdcall;
  SqlCbv: function(Cur: SqlTCUR): SqlTAPI; stdcall;
  SqlCdr: function(sHandle: SQLTSVH; Cur: SqlTCUR): SqlTAPI; stdcall;
  SqlCex: function(Cur: SqlTCUR; pData: SqlTDAP; lData: SqlTDAL): SqlTAPI; stdcall;
  SqlClf: function(Cur: SqlTSVH; LogFile: SqlTDAP; StartFlag: SqlTFMD): SqlTAPI; stdcall;
  SqlCmt: function(Cur: SqlTCur): SqlTAPI; stdcall;
  SqlCnc: function(var Cur: SqlTCur{Cur: SqlTCurPtr}; pDbName: SqlTDAP; lDbName: SqlTDAL): SqlTAPI; stdcall;
  SqlCnr: function(var Cur: SqlTCUR; pDbname: SqlTDAP; lDbName: SqlTDAL): SqlTAPI; stdcall;
  SqlCom: function(Cur: SqlTCUR; pCmd: SqlTDAP; lCmd: SqlTDAL): SqlTAPI; stdcall;
  SqlCon: function(var Cur: SqlTCUR; pDbName: SqlTDAP; lDbname: SqlTDAL;
		CurSiz: SqlTWSI; Pages: SqlTNPG; Recovr: SqlTRCF;
	        OutSize: SqlTDAL; InSize: SqlTDAL): SqlTAPI; stdcall;
  SqlCpy: function(fcur: SQLTCUR; selp: SQLTDAP; sell: SQLTDAL;
		tcur: SQLTCUR; isrtp: SQLTDAP; isrtl: SQLTDAL): SqlTAPI; stdcall;
  SqlCre: function(shandle: SQLTSVH; dbnamp: SQLTDAP; dbnaml: SQLTDAL): SqlTAPI; stdcall;
  SqlCrf: function(shandle: SQLTSVH; dbnam: SQLTDAP; dbnaml: SQLTDAL): SqlTAPI; stdcall;
  SqlCrs: function(cur: SQLTCUR; rsp: SQLTDAP; rsl: SQLTDAL): SqlTAPI; stdcall;
  SqlCsv: function(var shandlep: SQLTSVH; serverid: SQLTDAP; password: SQLTDAP): SqlTAPI; stdcall;
  SqlCty: function(cur: SQLTCUR; var cty: SQLTCTY): SqlTAPI; stdcall;
  SqlDbn: function(serverid: SQLTDAP; buffer: SQLTDAP; length: SQLTDAL): SqlTAPI; stdcall;
  SqlDed: function(shandle: SQLTSVH; dbnamp: SQLTDAP; dbnaml: SQLTDAL): SqlTAPI; stdcall;
  SqlDel: function(shandle: SQLTSVH; dbnamp: SQLTDAP; dbnaml: SQLTDAL): SqlTAPI; stdcall;
  SqlDes: function(cur: SQLTCUR; slc: SQLTSLC; ddt: SQLTDDTPtr; ddl: SQLTDDLPtr;
	        chp: SQLTCHP; chlp: SQLTCHLPtr;
	        prep: SQLTPREPtr; scap: SQLTSCAPtr): SqlTAPI; stdcall;
  SqlDid: function(dbname: SQLTDAP; dbnamel: SQLTDAL): SqlTAPI; stdcall;
  SqlDii: function(Cur: SQLTCUR; ivn: SQLTSLC; inp: SQLTDAP; inlp: SQLTCHLPtr): SqlTAPI; stdcall;
  SqlDin: function(dbnamp: SQLTDAP; dbnaml: SQLTDAL): SqlTAPI; stdcall;
  SqlDir: function(srvno: SQLTSVN; buffer: SQLTDAP; length: SQLTDAL): SqlTAPI; stdcall;
  SqlDis: function(cur: SQLTCUR): SqlTAPI; stdcall;
  SqlDon: function: SqlTApi; stdcall;
  SqlDox: function(shandle: SQLTSVH; dirnamep: SQLTDAP; fattr: SQLTFAT): SqlTAPI; stdcall;
  SqlDrc: function(cur: SQLTSVH): SqlTAPI; stdcall;
  SqlDro: function(shandle: SQLTSVH; dirname: SQLTDAP): SqlTAPI; stdcall;
  SqlDrr: function(shandle: SQLTSVH; filename: SQLTDAP): SqlTAPI; stdcall;
  SqlDrs: function(cur: SQLTCUR; rsp: SQLTDAP; rsl: SQLTDAL): SqlTAPI; stdcall;
  SqlDsc: function(Cur: SQLTCUR; slc: SQLTSLC; var edt: SQLTDDT; var edl: SQLTDDL;
	        chp: SQLTCHP; var chlp: SQLTCHL;
	        var prep: SQLTPRE; var scap: SQLTSCA): SqlTAPI; stdcall;
  SqlDst: function(cur: SQLTCUR; cnp: SQLTDAP; cnl: SQLTDAL): SqlTAPI; stdcall;
  SqlDsv: function(shandle: SQLTSVH): SqlTAPI; stdcall;
  SqlEbk: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlEfb: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlElo: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlEnr: function(shandle: SQLTSVH; dbname: SQLTDAP; dbnamel: SQLTDAL): SqlTAPI; stdcall;
  SqlEpo: function(Cur: SQLTCUR; var epo: SQLTEPO): SqlTAPI; stdcall;
  SqlErf: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlErr: function(error: SQLTRCD; msg: SQLTDAP): SqlTAPI; stdcall;
  SqlErs: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlEtx: function(error: SQLTRCD; msgtyp: SQLTPTY; bfp: SQLTDAP; bfl: SQLTDAL;
	        var txtlen: SQLTDAL): SqlTAPI; stdcall;
  SqlExe: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlExp: function(Cur: SQLTCUR; buffer: SQLTDAP; length: SQLTDAL): SqlTAPI; stdcall;
  SqlFbk: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlFer: function(error: SQLTRCD; msg: SQLTDAP): SqlTAPI; stdcall;
  SqlFet: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlFgt: function(Cur: SQLTSVH; srvfile: SQLTDAP; lcfile: SQLTDAP): SqlTAPI; stdcall;
  SqlFpt: function(Cur: SQLTSVH; srvfile: SQLTDAP; lclfile: SQLTDAP): SqlTAPI; stdcall;
  SqlFqn: function(Cur: SQLTCUR; field: SQLTFLD; nameptr: SQLTDAP; var namelen: SQLTDAL): SqlTApi; stdcall;
  SqlGbi: function(Cur: SQLTCUR; var BackEndCur: SQLTCUR; ppnm: SQLTPNMPtr): SqlTAPI; stdcall;
  SqlGdi: function(Cur: SQLTCUR; var gdi: TGdiDef): SqlTAPI; stdcall;
  SqlGet: function(Cur: SQLTCUR; parm: SQLTPTY; p: SQLTDAP; var l: SQLTDAL): SqlTAPI; stdcall;
  SqlGfi: function(Cur: SQLTCUR; slc: SQLTSLC;
		cvl: SQLTCDLPtr; fsc: SQLTFSCPtr): SqlTAPI; stdcall;
  SqlGls: function(Cur: SQLTCUR; slc: SQLTSLC; var size: SqlTLsi): SqlTAPI; stdcall;
  SqlGnl: function(shandle: SQLTSVH; dbname: SQLTDAP;
	        dbnamel: SQLTDAL; lognum: SQLTLNGPtr): SqlTAPI; stdcall;
  SqlGnr: function(Cur: SQLTCUR; tbnam: SQLTDAP;
	        tbnaml: SQLTDAL; rows: SQLTROWPtr): SqlTAPI; stdcall;
  SqlGsi: function(shandle: SQLTSVH; infoflags: SQLTFLG; buffer: SQLTDAP;
		buflen: SQLTDAL; var rbuflen: SQLTDAL): SqlTAPI; stdcall;
  SqlIdb: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlIms: function(Cur: SQLTCUR; InSize: SQLTDAL): SqlTAPI; stdcall;
  SqlInd: function(sHandle: SQLTSVH; pDbName: SQLTDAP;
	        lDbName: SQLTDAL): SqlTAPI; stdcall;
  SqlIni: function(CallBack: SQLTPFP): SqlTAPI; stdcall;
  SqlIns: function(SrvNo: SQLTSVN; DbName: SQLTDAP; lDbName: SQLTDAL;
		CreateFlag: SQLTFLG; OverWrite: SQLTFLG): SqlTAPI; stdcall;
  SqlLab: function(Cur: SQLTCUR; slc: SQLTSLC; lbp: SQLTCHP; lblp: SQLTCHLPTR): SqlTAPI; stdcall;
  SqlLdp: function(Cur: SQLTCUR; cmdp: SQLTDAP; cmdl: SQLTDAL): SqlTAPI; stdcall;
  SqlLsk: function(Cur: SQLTCUR; slc: SQLTSLC; pos: SQLTLSI): SqlTAPI; stdcall;
  SqlMcl: function(shandle: SQLTSVH; fd: SQLTFLH): SqlTAPI; stdcall;
  SqlMdl: function(shandle: SQLTSVH; filename: SQLTDAP): SqlTAPI; stdcall;
  SqlMop: function(shandle: SQLTSVH; fdp: SQLTFLHPTR; filename: SQLTDAP; openmode: SQLTFMD): SqlTAPI; stdcall;
  SqlMrd: function(shandle: SQLTSVH; fd: SQLTFLH;
                buffer: SQLTDAP; len: SQLTDAL; rlen: SQLTDALPTR): SqlTAPI; stdcall;
  SqlMsk: function(shandle: SQLTSVH; fd: SQLTFLH;
  	        offset: SQLTLNG; whence: SQLTWNC; roffset: SQLTLNGPTR): SqlTAPI; stdcall;
  SqlMwr: function(shandle: SQLTSVH; fd: SQLTFLH;
  	        buffer: SQLTDAP; len: SQLTDAL; rlen: SQLTDALPTR): SqlTAPI; stdcall;
  SqlNbv: function(Cur: SQLTCUR; var nbv: SQLTNBV): SqlTAPI; stdcall;
  SqlNii: function(Cur: SQLTCUR; var nii: SQLTNSI): SqlTAPI; stdcall;
  SqlNrr: function(Cur: SQLTCUR; var rcountp: SQLTROW): SqlTAPI; stdcall;
  SqlNsi: function(Cur: SQLTCUR; var nsi: SQLTNSI): SqlTAPI; stdcall;
  SqlOms: function(Cur: SQLTCUR; outsize: SQLTDAL): SqlTAPI; stdcall;
  SqlPrs: function(Cur: SQLTCUR; row: SQLTROW): SqlTAPI; stdcall;
  SqlRbf: function(Cur: SQLTCUR; var rbf: SQLTRBF): SqlTAPI; stdcall;
  SqlRbk: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlRcd: function(Cur: SQLTCUR; rcd: SQLTRCDPTR): SqlTAPI; stdcall;
  SqlRdb: function(shandle: SQLTSVH; dbname: SQLTDAP; dbnamel: SQLTDAL; bkpdir: SQLTFNP;
	        bkpdirl: SQLTFNL; local: SQLTBOO; over: SQLTBOO): SqlTAPI; stdcall;
  SqlRdc: function(Cur: SQLTCUR; bufp: SQLTDAP;
  	        buf: SQLTDAL; readl: SQLTDALPTR): SqlTAPI; stdcall;
  SqlRel: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlRes: function(var Cur: SQLTCUR; bkfname: SQLTFNP; bkfnlen: SQLTFNL;
		bkfserv: SQLTSVN; overwrt: SQLTBOO;
                dbname: SQLTDAP; dbnlen: SQLTDAL; dbserv: SQLTSVN): SqlTAPI; stdcall;
  SqlRet: function(Cur: SQLTCUR; cnp: SQLTDAP; cnl: SQLTDAL): SqlTAPI; stdcall;
  SqlRlf: function(shandle: SQLTSVH; dbname: SQLTDAP; dbnamel: SQLTDAL;
		bkpdir: SQLTFNP; bkpdirl: SQLTFNL;
                local: SQLTBOO; over: SQLTBOO): SqlTAPI; stdcall;
  SqlRlo: function(Cur: SQLTCUR; slc: SQLTSLC;
  	        bufp: SQLTDAP; bufl: SQLTDAL; var readl: SQLTDAL): SqlTAPI; stdcall;
  SqlRof: function(shandle: SQLTSVH; dbname: SQLTDAP; dbnamel: SQLTDAL;
  		mode: SQLTRFM; datetime: SQLTDAP; datetimel: SQLTDAL): SqlTAPI; stdcall;
  SqlRow: function(Cur: SQLTCUR; var row: SQLTROW): SqlTAPI; stdcall;
  SqlRrd: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlRrs: function(Cur: SQLTCUR; rsp: SQLTDAP;rsl: SQLTDAL): SqlTAPI; stdcall;
  SqlRsi: function(shandle: SQLTSVH): SqlTAPI; stdcall;
  SqlRss: function(shandle: SQLTSVH; dbname: SQLTDAP; dbnamel: SQLTDAL;
  		bkpdir: SQLTFNP; bkpdirl: SQLTFNL;
                local: SQLTBOO; over: SQLTBOO): SqlTAPI; stdcall;
  SqlSab: function(shandle: SQLTSVH; pnum: SQLTPNM): SqlTAPI; stdcall;
  SqlSap: function(srvno: SQLTSVN; password: SQLTDAP; pnum: SQLTPNM): SqlTAPI; stdcall;
  SqlScl: function(Cur: SQLTCUR; namp: SQLTDAP; naml: SQLTDAL): SqlTAPI; stdcall;
  SqlScn: function(Cur: SQLTCUR; namp: SQLTDAP; naml: SQLTDAL): SqlTAPI; stdcall;
  SqlScp: function(Pages: SQLTNPG): SqlTAPI; stdcall;
  SqlSdn: function(dbnamp: SQLTDAP; dbnaml: SQLTDAL): SqlTAPI; stdcall;
  SqlSds: function(shandle: SQLTSVH; shutdownflg: SQLTFLG): SqlTAPI; stdcall;
  SqlSdx: function(shandle: SQLTSVH; dbnamp: SQLTDAP;
	        dbnaml: SQLTDAL; shutdownflg: SQLTFLG): SqlTAPI; stdcall;
  SqlSet: function(Cur: SQLTCUR; parm: SQLTPTY; p: SQLTDAP; i: SQLTDAL): SqlTAPI; stdcall;
  SqlSil: function(Cur: SQLTCUR; isolation: SQLTILV): SqlTAPI; stdcall;
  SqlSlp: function(Cur: SQLTCUR; lpt: SQLTNPG; lpm: SQLTNPG): SqlTAPI; stdcall;
  SqlSpr: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlSrf: function(Cur: SQLTCUR; fnp: SQLTDAP; fnl: SQLTDAL): SqlTAPI; stdcall;
  SqlSrs: function(Cur: SQLTCUR): SqlTAPI; stdcall;
  SqlSsb: function(Cur: SQLTCUR; slc: SQLTSLC; pdt: SQLTPDT; pbp: TSDPtr;
  	       pdl: SQLTPDL; sca: SQLTSCA; pcv: SqlTCdlPtr; pfc: SqlTFscPtr): SqlTAPI; stdcall;

⌨️ 快捷键说明

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