📄 sdcsb.pas
字号:
{*******************************************************}
{ }
{ Delphi SQLDirect Component Library }
{ Centure SQLBase API(ver. 6,7) Interface Unit }
{ }
{ Copyright (c) 1997,2005 by Yuri Sheino }
{ }
{*******************************************************}
{$I SqlDir.inc}
unit SDCSb {$IFDEF SD_CLR} platform {$ENDIF};
interface
uses
Windows, SysUtils, Classes, Db, Dialogs, SyncObjs,
{$IFDEF SD_CLR}
System.Text, System.Runtime.InteropServices,
{$ENDIF}
SDCommon, SDConsts;
const
FetchOk = 0;
FetchEof = 1;
FetchUpd = 2;
FetchDel = 3;
{ FETCH RETURN CODES }
FetRTru = 1; // data truncated
FetRSin = 2; // signed number fetched
FetRDnn = 3; // data is not numeric
FetRNof = 4; // numeric overflow
FetRDtn = 5; // data type not supported
FetRDnd = 6; // data is not in date format
FetRNul = 7; // data is null
{ DATABASE DATA TYPES }
SqlDChr = 1; // character data type
SqlDNum = 2; // numeric data type
SqlDDat = 3; // date-time data type
SqlDLon = 4; // long data type
SqlDDte = 5; // date (only) data type
SqlDTim = 6; // time (only) data type
SqlDHdl = 7; // sql handle data type
SqlDBoo = 8; // boolean data type
SqlDDtm = 8; // maximum data type
{ PROGRAM DATA TYPES }
SqlPBuf = 1; // buffer
SqlPStr = 2; // string (zero terminated)
SqlPUch = 3; // unsigned char
SqlPSch = 4; // char
SqlPUin = 5; // unsigned int
SqlPSin = 6; // int
SqlPUlo = 7; // unsigned long
SqlPSlo = 8; // long
SqlPFlt = 9; // float
SqlPDou = 10; // double
SqlPNum = 11; // SQLBASE internal numeric format
SqlPDat = 12; // SQLBASE internal datetime format
SqlPUpd = 13; // unsigend packed decimal
SqlPSpd = 14; // signed packed decimal
SqlPDte = 15; // date only format
SqlPTim = 16; // time only format
SqlPUsh = 17; // unsigned short
SqlPSsh = 18; // short
SqlPNst = 19; // numeric string
SqlPNbu = 20; // numeric buffer
SqlPEbc = 21; // EBCDIC buffer format
SqlPLon = 22; // long text string
SqlPLbi = 23; // long binary buffer
SqlPLvr = 24; // char\long varchar > 254
SqlPDtm = 24; // data type maximum
{ EXTERNAL DATA TYPES }
SqlEInt = 1; // INTEGER
SqlESma = 2; // SMALLINT
SqlEFlo = 3; // FLOAT
SqlEChr = 4; // CHAR
SqlEVar = 5; // VARCHAR
SqlELon = 6; // LONGVAR
SqlEDec = 7; // DECIMAL
SqlEDat = 8; // DATE
SqlETim = 9; // TIME
SqlETms = 10; // TIMESTAMP
SqlEMon = 11; // MONEY
SqlEDou = 12; // DOUBLE
SqlEGph = 13; // GRAPHIC
SqlEVgp = 14; // VAR GRAPHIC
SqlELgp = 15; // LONG VAR GRAPHIC
SqlEBin = 16; // BINARY
SqlEVbi = 17; // VAR BINARY
SqlELbi = 18; // LONG BINARY
SqlEBoo = 19; // BOOLEAN
SqlELch = 20; // CHAR > 254
SqlELvr = 21; // VARCHAR > 254
{********* SET and GET PARAMETER TYPES ********}
{ Global parameters }
{ ------------------ }
SQLPDDB = 1; // default database name
SQLPDUS = 2; // default user name
SQLPDPW = 3; // default password
SQLPGBC = 4; // global cursor value
SQLPLRD = 5; // local result set directory
SQLPDBM = 6; // db mode - see below
SQLPDBD = 7; // dbdir
SQLPCPG = 8; // code page information
SQLPNIE = 9; // null indicator error
SQLPCPT = 10; // connect pass thru to backend
SQLPTPD = 11; // temp dir
SQLPDTR = 12; // distributed transaction mode
SQLPPSW = 15; // server password
SQLPOOJ = 16; // oracle outer join
SQLPNPF = 17; // net prefix
SQLPNLG = 18; // net log
SQLPNCT = 19; // net check type
SQLPNCK = 20; // net check
SQLPLCK = 22; // locks
SQLPINT = 25; // interrupt
SQLPERF = 27; // error file
SQLPDIO = 28; // direct I/O
SQLPSWR = 29; // default write
SQLPCTY = 31; // country
SQLPCSD = 32; // commit server daemon
SQLPCSR = 33; // commit server
SQLPCCK = 36; // client check
SQLPCTS = 37; // characterset
SQLPCGR = 38; // cache group
SQLPAIO = 39; // asyncio
SQLPANL = 40; // apply net log
SQLPGRS = 41; // get reentracy state
SQLPSTF = 42; // set SQLTrace flags
SQLPCLG = 43; // set commit-order logging
{ Server specific parameters }
{ -------------------------- }
SQLPHEP = 1001; // HEAP size for TSR executables
SQLPCAC = 1002; // CACHE size in Kbytes
SQLPBRN = 1003; // brand of database
SQLPVER = 1004; // release version (ex. "4.0.J")
SQLPPRF = 1005; // server profiling
SQLPPDB = 1006; // partitioned database
SQLPGCM = 1007; // group commit count
SQLPGCD = 1008; // group commit delay ticks
SQLPDLK = 1009; // number of deadlocks
SQLPCTL = 1010; // command time limit
SQLPAPT = 1011; // process timer activated
SQLPOSR = 1012; // OS sample rate
SQLPAWS = 1013; // OS Averaging window size
SQLPWKL = 1014; // Work Limit
SQLPWKA = 1015; // Work Space allocation
SQLPUSR = 1016; // Number of users
SQLPTMO = 1017; // time out
SQLPTSS = 1018; // thread stack size
SQLPTHM = 1019; // thread mode
SQLPSTC = 1020; // sortcache size in kilobytes
SQLPSIL = 1021; // silent mode
SQLPSPF = 1022; // server prefix
SQLPSVN = 1024; // server name
SQLPROM = 1025; // read-only mode (0 or 1)
SQLPSTA = 1026; // enable stats gathering
SQLPCSV = 1027; // commit server
SQLPTTP = 1028; // trace for 2PC
{ Database specific parameters }
{ ---------------------------- }
SQLPDBN = 2001; // database name
SQLPDDR = 2002; // database directory
SQLPLDR = 2003; // log directory
SQLPLFS = 2004; // log file size in Kbytes
SQLPCTI = 2005; // checkpoint time interval in mins
SQLPLBM = 2006; // log backup mode? (0 or 1)
SQLPPLF = 2007; // Pre-allocate log files? (0 or 1)
SQLPTSL = 2008; // transaction span limit
SQLPROT = 2009; // read-only transactions (0, 1, 2)
SQLPHFS = 2010; // history file size in Kbytes
SQLPREC = 2011; // recovery
SQLPEXE = 2012; // name of executable
SQLPNLB = 2013; // next log to backup
SQLPROD = 2014; // read-only database (0 or 1)
SQLPEXS = 2015; // database file extension size
SQLPPAR = 2016; // partitioned database (0 or 1)
SQLPNDB = 2017; // NEWDB
SQLPLGF = 2018; // log file offset
SQLPDTL = 2019; // command timelimit
SQLPSMN = 2020; // show main db
SQLPCVC = 2021; // catalog version counter
SQLPDBS = 2022; // database block size
SQLPUED = 2023; // update external dictionary
{ Cursor specific parameters }
{ -------------------------- }
SQLPISO = 3001; // isolation level (SQLILRR etc..)
SQLPWTO = 3002; // lock wait timeout in seconds
SQLPPCX = 3003; // preserve context (0 or 1)
SQLPFRS = 3004; // front end result sets
SQLPLDV = 3005; // load version (ex. "3.6.22")
SQLPAUT = 3006; // autocommit
SQLPRTO = 3007; // rollback trans on lock timeout
SQLPSCR = 3008; // scroll mode (0 or 1)
SQLPRES = 3009; // restriction mode (0 or 1)
SQLPFT = 3010; // fetch through
SQLPNPB = 3011; // no pre-build in RL mode
SQLPPWD = 3012; // current password
SQLPDB2 = 3013; // DB2 compatibility mode
SQLPREF = 3014; // referential integrity checking
SQLPBLK = 3015; // bulk-execute mode
SQLPOBL = 3016; // optimized bulk-execute mode
SQLPLFF = 3017; // LONG data allowed in FERS
SQLPDIS = 3018; // When to return Describe info
SQLPCMP = 3019; // Compress messages sent to server
SQLPCHS = 3020; // chained cmd has SELECT (0 or 1)
SQLPOPL = 3021; // optimizer level
SQLPRID = 3022; // ROWID
SQLPEMT = 3023; // Error Message Tokens
SQLPCLN = 3024; // client name
SQLPLSS = 3025; // last compiled SQL statement
SQLPEXP = 3026; // explain query plan
SQLPCXP = 3027; // cost of execution plan
SQLPOCL = 3028; // optimizercostlevel
SQLPTST = 3029; // distributed transaction status
SQLP2PP = 3030; // 2-phase protocol (SQL2STD, etc.)
{ defined for Load/Unload parsed parameters - cursor specific }
SQLPCLI = 3031; // ON CLIENT option
SQLPFNM = 3032; // load/unload file name
SQLPOVR = 3033; // file OVERWRITE flag
SQLPTFN = 3034; // A Temporary file name
SQLPTRC = 3035; // Trace stored procedures
SQLPTRF = 3036; // Tracefile for stored procedures
SQLPCTF = 3037; // control file flag
SQLPMID = 3038; // mail id
SQLPAID = 3039; // adapter id
SQLPNID = 3040; // network id
SQLPUID = 3041; // user application id
SQLPCIS = 3042; // client identification strings
SQLPIMB = 3043; // input message buffer size
SQLPOMB = 3044; // output message buffer size
SQLPWFC = 3045; // which fetchable command
SQLPRFE = 3046; // Return on First Error-bulk insert
SQLPCUN = 3047; // Current cursor user name
SQLPOFF = 3048; // Optimize First Fetch
{ Static attributes }
{ -------------------------- }
SQLPFAT = 4000; // first attribute
SQLPBRS = 4001; // back end result sets
SQLPMUL = 4002; // multi-user
SQLPDMO = 4003; // demonstration version
SQLPLOC = 4004; // local version of database
SQLPFPT = 4005; // 1st participant
SQLPLAT = 4006; // last attribute
SQLPCAP = 4007; // API capability level
SQLPSCL = 4008; // server capability level
SQLPRUN = 4009; // runtime version
{ Server specific parameters }
{ ---------------------------- }
SQLPPLV = 5001; // print level
SQLPALG = 5002; // activity log
SQLPTMS = 5003; // time stamp
SQLPPTH = 5004; // path name seperator
SQLPTMZ = 5005; // time zone
SQLPTCO = 5006; // time colon only
{ defines for database brands }
SQLBSQB = 1; // SQLBASE
SQLBDB2 = 2; // DB2
SQLBDBM = 3; // IBM OS/2 Database Manager
SQLBORA = 4; // Oracle
SQLBIGW = 5; // Informix
SQLBNTW = 6; // Netware SQL
SQLBAS4 = 7; // IBM AS/400 SQL/400
SQLBSYB = 8; // Sybase SQL Server
SQLBDBC = 9; // Teradata DBC Machines
SQLBALB = 10; // HP Allbase
SQLBRDB = 11; // DEC's RDB
SQLBTDM = 12; // Tandem's Nonstop SQL
SQLBSDS = 13; // IBM SQL/DS
SQLBSES = 14; // SNI SESAM
SQLBING = 15; // Ingres
SQLBSQL = 16; // SQL Access
SQLBDBA = 17; // DBase
SQLBDB4 = 18; // SNI DDB4
SQLBFUJ = 19; // Fujitsu RDBII
SQLBSUP = 20; // Cincom SUPRA
SQLB204 = 21; // CCA Model 204
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -