1{ 2 Copyright (c) 1999-2000 by Pavel Stingl <stingp1.eti@mail.cez.cz> 3 4 5 Oracle Call Interface Translation 6 7 See the file COPYING.FPC, included in this distribution, 8 for details about the copyright. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 14 **********************************************************************} 15unit OraOCI; 16 17{$MODE FPC} 18{$linklib clntsh} 19{$linklib common} 20{$linklib core4} 21{$linklib nlsrtl3} 22{$ifndef BSD} 23{$linklib dl} 24{$ENDIF} 25{$linklib c} 26 27interface 28 29 type 30 sb1 = shortint; 31 ub1 = byte; 32 sb2 = integer; 33 ub2 = word; 34 sb4 = longint; 35 ub4 = cardinal; 36 eb1 = byte; 37 eb2 = word; 38 eb4 = cardinal; 39 sword = integer; 40 uword = integer; 41 eword = integer; 42 PDouble = ^double; 43 PLongint = ^longint; 44 PPointer = ^pointer; 45 PWord = ^word; 46 PBoolean = ^boolean; 47 PCardinal = ^cardinal; 48 PByte = ^byte; 49 50 51 POCITime = ^OCITime; 52 OCITime = packed record 53 OCITimeHH : ub1; 54 OCITimeMM : ub1; 55 OCITimeSS : ub1; 56 end; 57 58 POCIDate = ^OCIDate; 59 OCIDate = packed record 60 OCIDateYYYY : sb2; 61 OCIDateMM : ub1; 62 OCIDateDD : ub1; 63 OCIDateTime : OCITime; 64 end; 65 66 POCIDateTime = ^TOCIDate; 67 TOCIDate = packed record 68 Year : sb2; 69 Month : ub1; 70 Day : ub1; 71 Hour : ub1; 72 Min : ub1; 73 Sec : ub1; 74 end; 75 76 PCDA_DEF = ^TCDA_DEF; 77 TCDA_DEF = packed record 78 v2_rc : sb2; 79 ft : ub2; 80 rpc : ub4; 81 peo : ub2; 82 fc : ub1; 83 rcs1 : ub1; 84 rc : ub2; 85 wrn : ub1; 86 rcs2 : ub1; 87 rcs3 : sword; 88 rid : record 89 rd : record 90 rcs4 : ub4; 91 rcs5 : ub2; 92 rcs6 : ub1; 93 end; 94 rcs7 : ub4; 95 rcs8 : ub2; 96 end; 97 ose : sword; 98 chk : ub1; 99 rcsp : pointer; 100 filler : array [39..64] of byte; 101 end; 102 103 PLDA_DEF = ^TCDA_DEF; 104 TLDA_DEF = TCDA_DEF; 105 106 107 108 const 109 EB4MAXVAL = 2147483647; 110 EB4MINVAL = 0; 111 UB4MAXVAL = $FFFFFFFF; 112 UB4MINVAL = 0; 113 SB4MAXVAL = 2147483647; 114 SB4MINVAL = -2147483647; 115 MINEB4MAXVAL = 2147483647; 116 MAXEB4MINVAL = 0; 117 MINUB4MAXVAL = $FFFFFFFF; 118 MAXUB4MINVAL = 0; 119 MINSB4MAXVAL = 2147483647; 120 MAXSB4MINVAL = -2147483647; 121 122 const 123 VARCHAR2_TYPE = 1; 124 NUMBER_TYPE = 2; 125 INT_TYPE = 3; 126 FLOAT_TYPE = 4; 127 STRING_TYPE = 5; 128 ROWID_TYPE = 11; 129 DATE_TYPE = 12; 130 131 { OCI Environment Modes for opinit call } 132 OCI_EV_DEF = 0; { default single-threaded environment } 133 OCI_EV_TSF = 1; { thread-safe environment } 134 135 { OCI Logon Modes for olog call } 136 OCI_LM_DEF = 0; { default login } 137 OCI_LM_NBL = 1; { non-blocking logon } 138 139 OCI_ONE_PIECE = 0; { there or this is the only piece } 140 OCI_FIRST_PIECE = 1; { the first of many pieces } 141 OCI_NEXT_PIECE = 2; { the next of many pieces } 142 OCI_LAST_PIECE = 3; { the last piece of this column } 143 144 { input data types } 145 SQLT_CHR = 1; { (ORANET TYPE) character string } 146 SQLT_NUM = 2; { (ORANET TYPE) oracle numeric } 147 SQLT_INT = 3; { (ORANET TYPE) integer } 148 SQLT_FLT = 4; { (ORANET TYPE) Floating point number } 149 SQLT_STR = 5; { zero terminated string } 150 SQLT_VNU = 6; { NUM with preceding length byte } 151 SQLT_PDN = 7; { (ORANET TYPE) Packed Decimal Numeric } 152 SQLT_LNG = 8; { long } 153 SQLT_VCS = 9; { Variable character string } 154 SQLT_NON = 10; { Null/empty PCC Descriptor entry } 155 SQLT_RID = 11; { rowid } 156 SQLT_DAT = 12; { date in oracle format } 157 SQLT_VBI = 15; { binary in VCS format } 158 SQLT_BIN = 23; { binary data(DTYBIN) } 159 SQLT_LBI = 24; { long binary } 160 SQLT_UIN = 68; { unsigned integer } 161 SQLT_SLS = 91; { Display sign leading separate } 162 SQLT_LVC = 94; { Longer longs (char) } 163 SQLT_LVB = 95; { Longer long binary } 164 SQLT_AFC = 96; { Ansi fixed char } 165 SQLT_AVC = 97; { Ansi Var char } 166 SQLT_CUR = 102; { cursor type } 167 SQLT_RDD = 104; { rowid descriptor } 168 SQLT_LAB = 105; { label type } 169 SQLT_OSL = 106; { oslabel type } 170 SQLT_NTY = 108; { named object type } 171 SQLT_REF = 110; { ref type } 172 SQLT_CLOB = 112; { character lob } 173 SQLT_BLOB = 113; { binary lob } 174 SQLT_BFILEE = 114; { binary file lob } 175 SQLT_CFILEE = 115; { character file lob } 176 SQLT_RSET = 116; { result set type } 177 SQLT_NCO = 122; { named collection type (varray or nested table) } 178 SQLT_VST = 155; { OCIString type } 179 SQLT_ODT = 156; { OCIDate type } 180 181 { binary file lob } 182 SQLT_FILE = SQLT_BFILEE; 183 SQLT_CFILE = SQLT_CFILEE; 184 SQLT_BFILE = SQLT_BFILEE; 185 186 { CHAR/NCHAR/VARCHAR2/NVARCHAR2/CLOB/NCLOB char set "form" information } 187 SQLCS_IMPLICIT = 1; { for CHAR, VARCHAR2, CLOB w/o a specified set } 188 SQLCS_NCHAR = 2; { for NCHAR, NCHAR VARYING, NCLOB } 189 SQLCS_EXPLICIT = 3; { for CHAR, etc, with "CHARACTER SET ..." syntax } 190 SQLCS_FLEXIBLE = 4; { for PL/SQL "flexible" parameters } 191 SQLCS_LIT_NULL = 5; { for typecheck of NULL and empty_clob() lits } 192 193 { OCI Modes } 194 OCI_DEFAULT = $00; { the default value for parameters and attributes } 195 OCI_THREADED = $01; { the application is in threaded environment } 196 OCI_OBJECT = $02; { the application is in object environment } 197 OCI_NON_BLOCKING = $04; { non blocking mode of operation } 198 OCI_ENV_NO_MUTEX = $08; { the environment handle will not be protected 199 by a mutex internally } 200 201 { OCI Handle Types } 202 { handle types range from 1 - 49 } 203 OCI_HTYPE_FIRST = 1; { start value of handle type } 204 OCI_HTYPE_ENV = 1; { environment handle } 205 OCI_HTYPE_ERROR = 2; { error handle } 206 OCI_HTYPE_SVCCTX = 3; { service handle } 207 OCI_HTYPE_STMT = 4; { statement handle } 208 OCI_HTYPE_BIND = 5; { bind handle } 209 OCI_HTYPE_DEFINE = 6; { define handle } 210 OCI_HTYPE_DESCRIBE = 7; { describe handle } 211 OCI_HTYPE_SERVER = 8; { server handle } 212 OCI_HTYPE_SESSION = 9; { authentication handle } 213 OCI_HTYPE_TRANS = 10; { transaction handle } 214 OCI_HTYPE_COMPLEXOBJECT = 11; { complex object retrieval handle } 215 OCI_HTYPE_SECURITY = 12; { security handle } 216 OCI_HTYPE_LAST = 12; { last value of a handle type } 217 218 { Descriptor Types } 219 { descriptor values range from 50 - 255 } 220 OCI_DTYPE_FIRST = 50; { start value of descriptor type } 221 OCI_DTYPE_LOB = 50; { lob locator } 222 OCI_DTYPE_SNAP = 51; { snapshot descriptor } 223 OCI_DTYPE_RSET = 52; { result set descriptor } 224 OCI_DTYPE_PARAM = 53; { a parameter descriptor obtained from ocigparm } 225 OCI_DTYPE_ROWID = 54; { rowid descriptor } 226 OCI_DTYPE_COMPLEXOBJECTCOMP = 55; { complex object retrieval descriptor } 227 OCI_DTYPE_FILE = 56; { File Lob locator } 228 OCI_DTYPE_AQENQ_OPTIONS = 57; { enqueue options } 229 OCI_DTYPE_AQDEQ_OPTIONS = 58; { dequeue options } 230 OCI_DTYPE_AQMSG_PROPERTIES = 59; { message properties } 231 OCI_DTYPE_AQAGENT = 60; { aq agent } 232 OCI_DTYPE_LAST = 60; { last value of a descriptor type } 233 234 { Object Ptr Types } 235 OCI_OTYPE_NAME = 1; { object name } 236 OCI_OTYPE_REF = 2; { REF to TDO } 237 OCI_OTYPE_PTR = 3; { PTR to TDO } 238 239 { Attribute Types } 240 { the OCI function code } 241 OCI_ATTR_FNCODE = 1; { the OCI function code } 242 OCI_ATTR_OBJECT = 2; { is the environment initialized in object mode } 243 OCI_ATTR_NONBLOCKING_MODE = 3; { non blocking mode } 244 OCI_ATTR_SQLCODE = 4; { the SQL verb } 245 OCI_ATTR_ENV = 5; { the environment handle } 246 OCI_ATTR_SERVER = 6; { the server handle } 247 OCI_ATTR_SESSION = 7; { the user session handle } 248 OCI_ATTR_TRANS = 8; { the transaction handle } 249 OCI_ATTR_ROW_COUNT = 9; { the rows processed so far } 250 OCI_ATTR_SQLFNCODE = 10; { the SQL verb of the statement } 251 OCI_ATTR_PREFETCH_ROWS = 11; { sets the number of rows to prefetch } 252 OCI_ATTR_NESTED_PREFETCH_ROWS = 12; { the prefetch rows of nested table } 253 OCI_ATTR_PREFETCH_MEMORY = 13; { memory limit for rows fetched } 254 OCI_ATTR_NESTED_PREFETCH_MEMORY = 14; { memory limit for nested rows } 255 OCI_ATTR_CHAR_COUNT = 15; { this specifies the bind and define size in characters } 256 OCI_ATTR_PDSCL = 16; { packed decimal scale } 257 OCI_ATTR_PDFMT = 17; { packed decimal format } 258 OCI_ATTR_PARAM_COUNT = 18; { number of column in the select list } 259 OCI_ATTR_ROWID = 19; { the rowid } 260 OCI_ATTR_CHARSET = 20; { the character set value } 261 OCI_ATTR_NCHAR = 21; { NCHAR type } 262 OCI_ATTR_USERNAME = 22; { username attribute } 263 OCI_ATTR_PASSWORD = 23; { password attribute } 264 OCI_ATTR_STMT_TYPE = 24; { statement type } 265 OCI_ATTR_INTERNAL_NAME = 25; { user friendly global name } 266 OCI_ATTR_EXTERNAL_NAME = 26; { the internal name for global txn } 267 OCI_ATTR_XID = 27; { XOPEN defined global transaction id } 268 OCI_ATTR_TRANS_LOCK = 28; { transaction lock } 269 OCI_ATTR_TRANS_NAME = 29; { string to identify a global transaction } 270 OCI_ATTR_HEAPALLOC = 30; { memory allocated on the heap } 271 OCI_ATTR_CHARSET_ID = 31; { Character Set ID } 272 OCI_ATTR_CHARSET_FORM = 32; { Character Set Form } 273 OCI_ATTR_MAXDATA_SIZE = 33; { Maximumsize of data on the server } 274 OCI_ATTR_CACHE_OPT_SIZE = 34; { object cache optimal size } 275 OCI_ATTR_CACHE_MAX_SIZE = 35; { object cache maximum size percentage } 276 OCI_ATTR_PINOPTION = 36; { object cache default pin option } 277 OCI_ATTR_ALLOC_DURATION = 37; { object cache default allocation duration } 278 OCI_ATTR_PIN_DURATION = 38; { object cache default pin duration } 279 OCI_ATTR_FDO = 39; { Format Descriptor object attribute } 280 OCI_ATTR_POSTPROCESSING_CALLBACK = 40; { Callback to process outbind data } 281 OCI_ATTR_POSTPROCESSING_CONTEXT = 41; { Callback context to process outbind data } 282 OCI_ATTR_ROWS_RETURNED = 42; { Number of rows returned in current iter - for Bind handles } 283 OCI_ATTR_FOCBK = 43; { Failover Callback attribute } 284 OCI_ATTR_IN_V8_MODE = 44; { is the server/service context in V8 mode } 285 OCI_ATTR_LOBEMPTY = 45; { empty lob ? } 286 OCI_ATTR_SESSLANG = 46; { session language handle } 287 288 { Enqueue Options } 289 OCI_ATTR_VISIBILITY = 47; { visibility } 290 OCI_ATTR_RELATIVE_MSGID = 48; { relative message id } 291 OCI_ATTR_SEQUENCE_DEVIATION = 49; { sequence deviation } 292 293 { Dequeue Options } 294 OCI_ATTR_CONSUMER_NAME = 50; { consumer name } 295 OCI_ATTR_DEQ_MODE = 51; { dequeue mode } 296 OCI_ATTR_NAVIGATION = 52; { navigation } 297 OCI_ATTR_WAIT = 53; { wait } 298 OCI_ATTR_DEQ_MSGID = 54; { dequeue message id } 299 300 { Message Properties } 301 OCI_ATTR_PRIORITY = 55; { priority } 302 OCI_ATTR_DELAY = 56; { delay } 303 OCI_ATTR_EXPIRATION = 57; { expiration } 304 OCI_ATTR_CORRELATION = 58; { correlation id } 305 OCI_ATTR_ATTEMPTS = 59; { # of attempts } 306 OCI_ATTR_RECIPIENT_LIST = 60; { recipient list } 307 OCI_ATTR_EXCEPTION_QUEUE = 61; { exception queue name } 308 OCI_ATTR_ENQ_TIME = 62; { enqueue time (only OCIAttrGet) } 309 OCI_ATTR_MSG_STATE = 63; { message state (only OCIAttrGet) } 310 311 { AQ Agent } 312 OCI_ATTR_AGENT_NAME = 64; { agent name } 313 OCI_ATTR_AGENT_ADDRESS = 65; { agent address } 314 OCI_ATTR_AGENT_PROTOCOL = 66; { agent protocol } 315 316 { Parameter Attribute Types } 317 OCI_ATTR_UNK = 101; { unknown attribute } 318 OCI_ATTR_NUM_COLS = 102; { number of columns } 319 OCI_ATTR_LIST_COLUMNS = 103; { parameter of the column list } 320 OCI_ATTR_RDBA = 104; { DBA of the segment header } 321 OCI_ATTR_CLUSTERED = 105; { whether the table is clustered } 322 OCI_ATTR_PARTITIONED = 106; { whether the table is partitioned } 323 OCI_ATTR_INDEX_ONLY = 107; { whether the table is index only } 324 OCI_ATTR_LIST_ARGUMENTS = 108; { parameter of the argument list } 325 OCI_ATTR_LIST_SUBPROGRAMS = 109; { parameter of the subprogram list } 326 OCI_ATTR_REF_TDO = 110; { REF to the type descriptor } 327 OCI_ATTR_LINK = 111; { the database link name } 328 OCI_ATTR_MIN = 112; { minimum value } 329 OCI_ATTR_MAX = 113; { maximum value } 330 OCI_ATTR_INCR = 114; { increment value } 331 OCI_ATTR_CACHE = 115; { number of sequence numbers cached } 332 OCI_ATTR_ORDER = 116; { whether the sequence is ordered } 333 OCI_ATTR_HW_MARK = 117; { high-water mark } 334 OCI_ATTR_TYPE_SCHEMA = 118; { type's schema name } 335 OCI_ATTR_TIMESTAMP = 119; { timestamp of the object } 336 OCI_ATTR_NUM_ATTRS = 120; { number of attributes } 337 OCI_ATTR_NUM_PARAMS = 121; { number of parameters } 338 OCI_ATTR_OBJID = 122; { object id for a table or view } 339 OCI_ATTR_PTYPE = 123; { type of info described by } 340 OCI_ATTR_PARAM = 124; { parameter descriptor } 341 OCI_ATTR_OVERLOAD_ID = 125; { overload ID for funcs and procs } 342 OCI_ATTR_TABLESPACE = 126; { table name space } 343 OCI_ATTR_TDO = 127; { TDO of a type } 344 OCI_ATTR_PARSE_ERROR_OFFSET = 128; { Parse Error offset } 345 346 { Credential Types } 347 OCI_CRED_RDBMS = 1; { database username/password } 348 OCI_CRED_EXT = 2; { externally provided credentials } 349 350 { Error Return Values } 351 OCI_SUCCESS = 0; { maps to SQL_SUCCESS of SAG CLI } 352 OCI_SUCCESS_WITH_INFO = 1; { maps to SQL_SUCCESS_WITH_INFO } 353 OCI_NO_DATA = 100; { maps to SQL_NO_DATA } 354 OCI_ERROR = -(1); { maps to SQL_ERROR } 355 OCI_INVALID_HANDLE = -(2); { maps to SQL_INVALID_HANDLE } 356 OCI_NEED_DATA = 99; { maps to SQL_NEED_DATA } 357 OCI_STILL_EXECUTING = -(3123); { OCI would block error } 358 OCI_CONTINUE = -(24200); { Continue with the body of the OCI function } 359 360 { Parsing Syntax Types } 361 OCI_V7_SYNTAX = 2; { V7 language } 362 OCI_V8_SYNTAX = 3; { V8 language } 363 OCI_NTV_SYNTAX = 1; 364 { Use what so ever is the native lang of server } 365 { these values must match the values defined in kpul.h } 366 367 { Scrollable Cursor Options } 368 OCI_FETCH_NEXT = $02; { next row } 369 OCI_FETCH_FIRST = $04; { first row of the result set } 370 OCI_FETCH_LAST = $08; { the last row of the result set } 371 OCI_FETCH_PRIOR = $10; { the previous row relative to current } 372 OCI_FETCH_ABSOLUTE = $20; { absolute offset from first } 373 OCI_FETCH_RELATIVE = $40; { offset relative to current } 374 375 { Bind and Define Options } 376 OCI_SB2_IND_PTR = $01; { unused } 377 OCI_DATA_AT_EXEC = $02; { data at execute time } 378 OCI_DYNAMIC_FETCH = $02; { fetch dynamically } 379 OCI_PIECEWISE = $04; { piecewise DMLs or fetch } 380 381 { Execution Modes } 382 OCI_BATCH_MODE = $01; { batch the oci statement for execution } 383 OCI_EXACT_FETCH = $02; { fetch the exact rows specified } 384 OCI_KEEP_FETCH_STATE = $04; { unused } 385 OCI_SCROLLABLE_CURSOR = $08; { cursor scrollable } 386 OCI_DESCRIBE_ONLY = $10; { only describe the statement } 387 OCI_COMMIT_ON_SUCCESS = $20; { commit, if successful execution } 388 389 { Authentication Modes } 390 OCI_MIGRATE = $0001; { migratable auth context } 391 OCI_SYSDBA = $0002; { for SYSDBA authorization } 392 OCI_SYSOPER = $0004; { for SYSOPER authorization } 393 OCI_PRELIM_AUTH = $0008; { for preliminary authorization } 394 395 { Piece Information } 396 OCI_PARAM_IN = $01; { in parameter } 397 OCI_PARAM_OUT = $02; { out parameter } 398 399 { Transaction Start Flags } 400 { NOTE: OCI_TRANS_JOIN and OCI_TRANS_NOMIGRATE not supported in 8.0.X } 401 { starts a new transaction branch } 402 OCI_TRANS_NEW = $00000001; { starts a new transaction branch } 403 OCI_TRANS_JOIN = $00000002; { join an existing transaction } 404 OCI_TRANS_RESUME = $00000004; { resume this transaction } 405 OCI_TRANS_STARTMASK = $000000ff; 406 OCI_TRANS_READONLY = $00000100; { starts a readonly transaction } 407 OCI_TRANS_READWRITE = $00000200; { starts a read-write transaction } 408 OCI_TRANS_SERIALIZABLE = $00000400; { starts a serializable transaction } 409 OCI_TRANS_ISOLMASK = $0000ff00; 410 OCI_TRANS_LOOSE = $00010000; { a loosely coupled branch } 411 OCI_TRANS_TIGHT = $00020000; { a tightly coupled branch } 412 OCI_TRANS_TYPEMASK = $000f0000; 413 OCI_TRANS_NOMIGRATE = $00100000; { non migratable transaction } 414 415 { Transaction End Flags } 416 OCI_TRANS_TWOPHASE = $01000000; { use two phase commit } 417 418 { AQ Constants 419 NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE 420 The following constants must match the PL/SQL dbms_aq constants 421 NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE 422 } 423 { Visibility flags } 424 OCI_ENQ_IMMEDIATE = 1; { enqueue is an independent transaction } 425 OCI_ENQ_ON_COMMIT = 2; { enqueue is part of current transaction } 426 427 OCI_DEQ_BROWSE = 1; { read message without acquiring a lock } 428 OCI_DEQ_LOCKED = 2; { read and obtain write lock on message } 429 OCI_DEQ_REMOVE = 3; { read the message and delete it } 430 431 { Dequeue navigation flags } 432 OCI_DEQ_FIRST_MSG = 1; { get first message at head of queue } 433 OCI_DEQ_NEXT_MSG = 3; { next message that is available } 434 OCI_DEQ_NEXT_TRANSACTION = 2; { get first message of next txn group } 435 436 { Message states } 437 OCI_MSG_WAITING = 1; { the message delay has not yet completed } 438 OCI_MSG_READY = 0; { the message is ready to be processed } 439 OCI_MSG_PROCESSED = 2; { the message has been processed } 440 OCI_MSG_EXPIRED = 3; { message has moved to exception queue } 441 442 { Sequence deviation } 443 OCI_ENQ_BEFORE = 2; { enqueue message before another message } 444 OCI_ENQ_TOP = 3; { enqueue message before all messages } 445 446 { Visibility flags } 447 OCI_DEQ_IMMEDIATE = 1; { dequeue is an independent transaction } 448 OCI_DEQ_ON_COMMIT = 2; { dequeue is part of current transaction } 449 450 { Wait } 451 OCI_DEQ_WAIT_FOREVER = -(1); { wait forever if no message available } 452 OCI_DEQ_NO_WAIT = 0; { do not wait if no message is available } 453 454 { Delay } 455 OCI_MSG_NO_DELAY = 0; { message is available immediately } 456 457 { Expiration } 458 OCI_MSG_NO_EXPIRATION = -(1); { message will never expire } 459 460 { -------------------------- END AQ Constants ----------------------------- } 461 {-----------Object Types Not to be Used -------------------------- } 462 { Deprecated } 463 OCI_OTYPE_UNK = 0; 464 OCI_OTYPE_TABLE = 1; 465 OCI_OTYPE_VIEW = 2; 466 OCI_OTYPE_SYN = 3; 467 OCI_OTYPE_PROC = 4; 468 OCI_OTYPE_FUNC = 5; 469 OCI_OTYPE_PKG = 6; 470 OCI_OTYPE_STMT = 7; 471 472 { Describe Handle Parameter Attributes } 473 { Attributes common to Columns and Stored Procs } 474 OCI_ATTR_DATA_SIZE = 1; { maximum size of the data } 475 OCI_ATTR_DATA_TYPE = 2; { the SQL type of the column/argument } 476 OCI_ATTR_DISP_SIZE = 3; { the display size } 477 OCI_ATTR_NAME = 4; { the name of the column/argument } 478 OCI_ATTR_PRECISION = 5; { precision if number type } 479 OCI_ATTR_SCALE = 6; { scale if number type } 480 OCI_ATTR_IS_NULL = 7; { is it null ? } 481 OCI_ATTR_TYPE_NAME = 8; { name of the named data type or a package name for package private types } 482 OCI_ATTR_SCHEMA_NAME = 9; { the schema name } 483 OCI_ATTR_SUB_NAME = 10; { type name if package private type } 484 OCI_ATTR_POSITION = 11; { relative position of col/arg in the list of cols/args } 485 OCI_ATTR_COMPLEXOBJECTCOMP_TYPE = 50; { complex object retrieval parameter attributes } 486 OCI_ATTR_COMPLEXOBJECTCOMP_TYPE_LEVEL = 51; 487 OCI_ATTR_COMPLEXOBJECT_LEVEL = 52; 488 OCI_ATTR_COMPLEXOBJECT_COLL_OUTOFLINE = 53; 489 490 { Only Columns } 491 OCI_ATTR_DISP_NAME = 100; { the display name } 492 493 {Only Stored Procs } 494 OCI_ATTR_OVERLOAD = 210; { is this position overloaded } 495 OCI_ATTR_LEVEL = 211; { level for structured types } 496 OCI_ATTR_HAS_DEFAULT = 212; { has a default value } 497 OCI_ATTR_IOMODE = 213; { in, out inout } 498 OCI_ATTR_RADIX = 214; { returns a radix } 499 OCI_ATTR_NUM_ARGS = 215; { total number of arguments } 500 501 { only named type attributes } 502 OCI_ATTR_TYPECODE = 216; { object or collection } 503 OCI_ATTR_COLLECTION_TYPECODE = 217; { varray or nested table } 504 OCI_ATTR_VERSION = 218; { user assigned version } 505 OCI_ATTR_IS_INCOMPLETE_TYPE = 219; { is this an incomplete type } 506 OCI_ATTR_IS_SYSTEM_TYPE = 220; { a system type } 507 OCI_ATTR_IS_PREDEFINED_TYPE = 221; { a predefined type } 508 OCI_ATTR_IS_TRANSIENT_TYPE = 222; { a transient type } 509 OCI_ATTR_IS_SYSTEM_GENERATED_TYPE = 223; { system generated type } 510 OCI_ATTR_HAS_NESTED_TABLE = 224; { contains nested table attr } 511 OCI_ATTR_HAS_LOB = 225; { has a lob attribute } 512 OCI_ATTR_HAS_FILE = 226; { has a file attribute } 513 OCI_ATTR_COLLECTION_ELEMENT = 227; { has a collection attribute } 514 OCI_ATTR_NUM_TYPE_ATTRS = 228; { number of attribute types } 515 OCI_ATTR_LIST_TYPE_ATTRS = 229; { list of type attributes } 516 OCI_ATTR_NUM_TYPE_METHODS = 230; { number of type methods } 517 OCI_ATTR_LIST_TYPE_METHODS = 231; { list of type methods } 518 OCI_ATTR_MAP_METHOD = 232; { map method of type } 519 OCI_ATTR_ORDER_METHOD = 233; { order method of type } 520 521 { only collection element } 522 OCI_ATTR_NUM_ELEMS = 234; { number of elements } 523 524 { only type methods } 525 OCI_ATTR_ENCAPSULATION = 235; { encapsulation level } 526 OCI_ATTR_IS_SELFISH = 236; { method selfish } 527 OCI_ATTR_IS_VIRTUAL = 237; { virtual } 528 OCI_ATTR_IS_INLINE = 238; { inline } 529 OCI_ATTR_IS_CONSTANT = 239; { constant } 530 OCI_ATTR_HAS_RESULT = 240; { has result } 531 OCI_ATTR_IS_CONSTRUCTOR = 241; { constructor } 532 OCI_ATTR_IS_DESTRUCTOR = 242; { destructor } 533 OCI_ATTR_IS_OPERATOR = 243; { operator } 534 OCI_ATTR_IS_MAP = 244; { a map method } 535 OCI_ATTR_IS_ORDER = 245; { order method } 536 OCI_ATTR_IS_RNDS = 246; { read no data state method } 537 OCI_ATTR_IS_RNPS = 247; { read no process state } 538 OCI_ATTR_IS_WNDS = 248; { write no data state method } 539 OCI_ATTR_IS_WNPS = 249; { write no process state } 540 541 { describing public objects } 542 OCI_ATTR_DESC_PUBLIC = 250; { public object } 543 544 {---------------------------OCIPasswordChange------------------------------- } 545 OCI_AUTH = $08; { Change the password but do not login } 546 547 {------------------------Other Constants------------------------------------ } 548 OCI_MAX_FNS = 100; { max number of OCI Functions } 549 OCI_SQLSTATE_SIZE = 5; 550 OCI_ERROR_MAXMSG_SIZE = 1024; { max size of an error message } 551 OCI_LOBMAXSIZE = MINUB4MAXVAL; { maximum lob data size } 552 OCI_ROWID_LEN = 23; 553 {------------------------ Fail Over Events --------------------------------- } 554 OCI_FO_END = $00000001; 555 OCI_FO_ABORT = $00000002; 556 OCI_FO_REAUTH = $00000004; 557 OCI_FO_BEGIN = $00000008; 558 OCI_FO_ERROR = $00000010; 559 {------------------------- Fail Over Types --------------------------------- } 560 OCI_FO_NONE = $00000001; 561 OCI_FO_SESSION = $00000002; 562 OCI_FO_SELECT = $00000004; 563 OCI_FO_TXNAL = $00000008; 564 {-----------------------Function Codes-------------------------------------- } 565 { OCIInitialize } 566 OCI_FNCODE_INITIALIZE = 1; 567 { OCIHandleAlloc } 568 OCI_FNCODE_HANDLEALLOC = 2; 569 { OCIHandleFree } 570 OCI_FNCODE_HANDLEFREE = 3; 571 { OCIDescriptorAlloc } 572 OCI_FNCODE_DESCRIPTORALLOC = 4; 573 { OCIDescriptorFree } 574 OCI_FNCODE_DESCRIPTORFREE = 5; 575 { OCIEnvInit } 576 OCI_FNCODE_ENVINIT = 6; 577 { OCIServerAttach } 578 OCI_FNCODE_SERVERATTACH = 7; 579 { OCIServerDetach } 580 OCI_FNCODE_SERVERDETACH = 8; 581 { unused 9 } 582 { OCISessionBegin } 583 OCI_FNCODE_SESSIONBEGIN = 10; 584 { OCISessionEnd } 585 OCI_FNCODE_SESSIONEND = 11; 586 { OCIPasswordChange } 587 OCI_FNCODE_PASSWORDCHANGE = 12; 588 { OCIStmtPrepare } 589 OCI_FNCODE_STMTPREPARE = 13; 590 { unused 14- 16 } 591 { OCIBindDynamic } 592 OCI_FNCODE_BINDDYNAMIC = 17; 593 { OCIBindObject } 594 OCI_FNCODE_BINDOBJECT = 18; 595 { 19 unused } 596 { OCIBindArrayOfStruct } 597 OCI_FNCODE_BINDARRAYOFSTRUCT = 20; 598 { OCIStmtExecute } 599 OCI_FNCODE_STMTEXECUTE = 21; 600 { unused 22-24 } 601 { OCIDefineObject } 602 OCI_FNCODE_DEFINEOBJECT = 25; 603 { OCIDefineDynamic } 604 OCI_FNCODE_DEFINEDYNAMIC = 26; 605 { OCIDefineArrayOfStruct } 606 OCI_FNCODE_DEFINEARRAYOFSTRUCT = 27; 607 { OCIStmtFetch } 608 OCI_FNCODE_STMTFETCH = 28; 609 { OCIStmtGetBindInfo } 610 OCI_FNCODE_STMTGETBIND = 29; 611 { 30, 31 unused } 612 { OCIDescribeAny } 613 OCI_FNCODE_DESCRIBEANY = 32; 614 { OCITransStart } 615 OCI_FNCODE_TRANSSTART = 33; 616 { OCITransDetach } 617 OCI_FNCODE_TRANSDETACH = 34; 618 { OCITransCommit } 619 OCI_FNCODE_TRANSCOMMIT = 35; 620 { 36 unused } 621 { OCIErrorGet } 622 OCI_FNCODE_ERRORGET = 37; 623 { OCILobFileOpen } 624 OCI_FNCODE_LOBOPENFILE = 38; 625 { OCILobFileClose } 626 OCI_FNCODE_LOBCLOSEFILE = 39; 627 { 40 was LOBCREATEFILE, unused } 628 { 41 was OCILobFileDelete, unused } 629 { OCILobCopy } 630 OCI_FNCODE_LOBCOPY = 42; 631 { OCILobAppend } 632 OCI_FNCODE_LOBAPPEND = 43; 633 { OCILobErase } 634 OCI_FNCODE_LOBERASE = 44; 635 { OCILobGetLength } 636 OCI_FNCODE_LOBLENGTH = 45; 637 { OCILobTrim } 638 OCI_FNCODE_LOBTRIM = 46; 639 { OCILobRead } 640 OCI_FNCODE_LOBREAD = 47; 641 { OCILobWrite } 642 OCI_FNCODE_LOBWRITE = 48; 643 { 49 unused } 644 { OCIBreak } 645 OCI_FNCODE_SVCCTXBREAK = 50; 646 { OCIServerVersion } 647 OCI_FNCODE_SERVERVERSION = 51; 648 { unused 52, 53 } 649 { OCIAttrGet } 650 OCI_FNCODE_ATTRGET = 54; 651 { OCIAttrSet } 652 OCI_FNCODE_ATTRSET = 55; 653 { OCIParamSet } 654 OCI_FNCODE_PARAMSET = 56; 655 { OCIParamGet } 656 OCI_FNCODE_PARAMGET = 57; 657 { OCIStmtGetPieceInfo } 658 OCI_FNCODE_STMTGETPIECEINFO = 58; 659 { OCILdaToSvcCtx } 660 OCI_FNCODE_LDATOSVCCTX = 59; 661 { 60 unused } 662 { OCIStmtSetPieceInfo } 663 OCI_FNCODE_STMTSETPIECEINFO = 61; 664 { OCITransForget } 665 OCI_FNCODE_TRANSFORGET = 62; 666 { OCITransPrepare } 667 OCI_FNCODE_TRANSPREPARE = 63; 668 { OCITransRollback } 669 OCI_FNCODE_TRANSROLLBACK = 64; 670 { OCIDefineByPos } 671 OCI_FNCODE_DEFINEBYPOS = 65; 672 { OCIBindByPos } 673 OCI_FNCODE_BINDBYPOS = 66; 674 { OCIBindByName } 675 OCI_FNCODE_BINDBYNAME = 67; 676 { OCILobAssign } 677 OCI_FNCODE_LOBASSIGN = 68; 678 { OCILobIsEqual } 679 OCI_FNCODE_LOBISEQUAL = 69; 680 { OCILobLocatorIsInit } 681 OCI_FNCODE_LOBISINIT = 70; 682 { 71 was lob locator size in beta2 } 683 { OCILobEnableBuffering } 684 OCI_FNCODE_LOBENABLEBUFFERING = 71; 685 { OCILobCharSetID } 686 OCI_FNCODE_LOBCHARSETID = 72; 687 { OCILobCharSetForm } 688 OCI_FNCODE_LOBCHARSETFORM = 73; 689 { OCILobFileSetName } 690 OCI_FNCODE_LOBFILESETNAME = 74; 691 { OCILobFileGetName } 692 OCI_FNCODE_LOBFILEGETNAME = 75; 693 { OCILogon } 694 OCI_FNCODE_LOGON = 76; 695 { OCILogoff } 696 OCI_FNCODE_LOGOFF = 77; 697 { OCILobDisableBuffering } 698 OCI_FNCODE_LOBDISABLEBUFFERING = 78; 699 { OCILobFlushBuffer } 700 OCI_FNCODE_LOBFLUSHBUFFER = 79; 701 { OCILobLoadFromFile } 702 OCI_FNCODE_LOBLOADFROMFILE = 80; 703 704 {--------------------------- FILE open modes ------------------------------- } 705 OCI_FILE_READONLY = 1; { readonly mode open for FILE types } 706 707 {----------------------- LOB Buffering Flush Flags ------------------------- } 708 OCI_LOB_BUFFER_FREE = 1; 709 OCI_LOB_BUFFER_NOFREE = 2; 710 711 {--------------------------- OCI Statement Types --------------------------- } 712 OCI_STMT_SELECT = 1; { select statement } 713 OCI_STMT_UPDATE = 2; { update statement } 714 OCI_STMT_DELETE = 3; { delete statement } 715 OCI_STMT_INSERT = 4; { Insert Statement } 716 OCI_STMT_CREATE = 5; { create statement } 717 OCI_STMT_DROP = 6; { drop statement } 718 OCI_STMT_ALTER = 7; { alter statement } 719 OCI_STMT_BEGIN = 8; { begin ... (pl/sql statement) } 720 OCI_STMT_DECLARE = 9; { declare .. (pl/sql statement ) } 721 722 {--------------------------- OCI Parameter Types --------------------------- } 723 OCI_PTYPE_UNK = 0; { unknown } 724 OCI_PTYPE_TABLE = 1; { table } 725 OCI_PTYPE_VIEW = 2; { view } 726 OCI_PTYPE_PROC = 3; { procedure } 727 OCI_PTYPE_FUNC = 4; { function } 728 OCI_PTYPE_PKG = 5; { package } 729 OCI_PTYPE_TYPE = 6; { user-defined type } 730 OCI_PTYPE_SYN = 7; { synonym } 731 OCI_PTYPE_SEQ = 8; { sequence } 732 OCI_PTYPE_COL = 9; { column } 733 OCI_PTYPE_ARG = 10; { argument } 734 OCI_PTYPE_LIST = 11; { list } 735 OCI_PTYPE_TYPE_ATTR = 12; { user-defined type's attribute } 736 OCI_PTYPE_TYPE_COLL = 13; { collection type's element } 737 OCI_PTYPE_TYPE_METHOD = 14; { collection type's element } 738 OCI_PTYPE_TYPE_ARG = 15; { user-defined type method's argument } 739 OCI_PTYPE_TYPE_RESULT = 16; { user-defined type method's result } 740 741 {----------------------------- OCI List Types ------------------------------ } 742 OCI_LTYPE_UNK = 0; { unknown } 743 OCI_LTYPE_COLUMN = 1; { column list } 744 OCI_LTYPE_ARG_PROC = 2; { procedure argument list } 745 OCI_LTYPE_ARG_FUNC = 3; { function argument list } 746 OCI_LTYPE_SUBPRG = 4; { subprogram list } 747 OCI_LTYPE_TYPE_ATTR = 5; { type attribute } 748 OCI_LTYPE_TYPE_METHOD = 6; { type method } 749 OCI_LTYPE_TYPE_ARG_PROC = 7; { type method w/o result argument list } 750 OCI_LTYPE_TYPE_ARG_FUNC = 8; { type method w/result argument list } 751 752type { Handle Definitions 753 } 754 OCIEnv = pointer; { OCI environment handle 755 } 756 OCIError = pointer; { OCI error handle 757 } 758 OCISvcCtx = pointer; { OCI service handle } 759 OCIStmt = pointer; { OCI statement handle } 760 OCIBind = pointer; { OCI bind handle 761 } 762 OCIDefine = pointer; { OCI Define handle 763 } 764 OCIDescribe = pointer; { OCI Describe handle 765 } 766 OCIServer = pointer; { OCI Server handle 767 } 768 OCISession = pointer; { OCI Authentication handle 769 } 770 OCIComplexObject = pointer; { OCI COR handle 771 } 772 OCITrans = pointer; { OCI Transaction handle 773 } 774 OCISecurity = pointer; { OCI Security handle 775 } 776 OCIDirPathCtx = pointer; { OCI Direct Path handle 777 } 778 779type 780 OCILobLocator = pointer; { OCI LOB Locator } 781 OCIType = pointer; 782 OCICallbackInBind = pointer; 783 OCICallbackOutBind = pointer; 784 OCISnapshot = pointer; 785 OCIResult = pointer; 786 OCICallbackDefine = pointer; 787 OCIParam = pointer; 788 789 790 function OCIInitialize( 791 mode:cardinal; 792 ctxp:pointer; 793 malocfp:pointer; 794 ralocfp:pointer; 795 mfreefp:pointer):sword;cdecl;external; 796 797 function OCIHandleAlloc( 798 parenth:pointer; 799 var hndlpp:pointer; 800 AType:cardinal; 801 xtramem_sz:cardinal; 802 usrmempp:pointer):sword;cdecl;external; 803 804 function OCIHandleFree( 805 hndlp:pointer; 806 AType:cardinal):sword;cdecl;external; 807 808 function OCIEnvInit( 809 var envp: OCIEnv; 810 811 mode: ub4; 812 xtramemsz: Integer; 813 usrmempp: pointer): sword; cdecl;external; 814 815 function OCIDescriptorAlloc( 816 parenth:pointer; 817 descpp:pointer; 818 AType:cardinal; 819 xtramem_sz:cardinal; 820 usrmempp:pointer):sword;cdecl;external; 821 822 function OCIDescriptorFree( 823 descp:pointer; 824 AType:cardinal):sword;cdecl;external; 825 826 function OCIServerAttach( 827 srvhp:OCIServer; 828 errhp:OCIError; 829 dblink:PChar; 830 dblink_len:longint; 831 mode:cardinal):sword;cdecl;external; 832 833 function OCIServerDetach( 834 srvhp:OCIServer; 835 errhp:OCIError; 836 mode:cardinal):sword;cdecl;external; 837 838 function OCISessionBegin( 839 svchp:OCISvcCtx; 840 errhp:OCIError; 841 usrhp:OCISession; 842 credt:cardinal; 843 mode:cardinal):sword;cdecl;external; 844 845 function OCISessionEnd( 846 svchp:OCISvcCtx; 847 errhp:OCIError; 848 usrhp:OCISession; 849 mode:cardinal):sword;cdecl;external; 850 851 function OCILogon( 852 envhp:OCIEnv; 853 errhp:OCIError; 854 var svchp:OCISvcCtx; 855 username:PChar; 856 uname_len:cardinal; 857 password:PChar; 858 passwd_len:cardinal; 859 dbname:PChar; 860 dbname_len:cardinal):sword;cdecl;external; 861 862 function OCILogoff( 863 svchp:OCISvcCtx; 864 errhp:OCIError):sword;cdecl;external; 865 866 function OCIErrorGet( 867 hndlp:pointer; 868 recordno:cardinal; 869 sqlstate:PChar; 870 var errcodep:PLongint; 871 bufp:PChar; 872 bufsiz:cardinal; 873 AType:cardinal):sword;cdecl;external; 874 875 function OCIPasswordChange( 876 svchp:OCISvcCtx; 877 errhp:OCIError; 878 user_name:PChar; 879 usernm_len:cardinal; 880 opasswd:PChar; 881 opasswd_len:cardinal; 882 npasswd:PChar; 883 npasswd_len:cardinal; 884 mode:cardinal):sword;cdecl;external; 885 886 function OCIStmtPrepare( 887 stmtp:OCIStmt; 888 errhp:OCIError; 889 stmt:PChar; 890 stmt_len:cardinal; 891 language:cardinal; 892 mode:cardinal):sword;cdecl;external; 893 894 function OCIBindByPos( 895 stmtp:OCIStmt; 896 bindp:OCIBind; 897 errhp:OCIError; 898 position:cardinal; 899 valuep:pointer; 900 value_sz:longint; 901 dty:word; 902 indp:pointer; 903 alenp:pword; rcodep:pword; 904 maxarr_len:cardinal; 905 curelep:pcardinal; 906 mode:cardinal):sword;cdecl;external; 907 908 function OCIBindByName( 909 stmtp:OCIStmt; 910 bindp:OCIBind; 911 errhp:OCIError; 912 placeholder:PChar; 913 placeh_len:longint; 914 valuep:pointer; 915 value_sz:longint; 916 dty:word; 917 indp:pointer; 918 alenp:pword; 919 rcodep:pword; 920 maxarr_len:cardinal; 921 curelep:pcardinal; 922 mode:cardinal):sword;cdecl;external; 923 924 function OCIBindObject( 925 bindp:OCIBind; 926 errhp:OCIError; 927 AType:OCIType; 928 pgvpp:pointer; 929 pvszsp:pcardinal; 930 indpp:pointer; 931 indszp:pcardinal):sword;cdecl;external; 932 933 function OCIBindDynamic( 934 bindp:OCIBind; 935 errhp:OCIError; 936 ictxp:pointer; 937 icbfp:OCICallbackInBind; 938 octxp:pointer; 939 ocbfp:OCICallbackOutBind):sword;cdecl;external; 940 941 function OCIBindArrayOfStruct( 942 bindp:OCIBind; 943 errhp:OCIError; 944 pvskip:cardinal; 945 indskip:cardinal; 946 alskip:cardinal; 947 rcskip:cardinal):sword;cdecl;external; 948 949 function OCIStmtGetPieceInfo( 950 stmtp:OCIStmt; 951 errhp:OCIError; 952 hndlpp:pointer; 953 typep:pcardinal; 954 in_outp:pbyte; 955 iterp:pcardinal; 956 idxp:pcardinal; 957 piecep:pbyte):sword;cdecl;external; 958 959 function OCIStmtSetPieceInfo( 960 hndlp:pointer; 961 AType:cardinal; 962 errhp:OCIError; 963 bufp:pointer; 964 alenp:pcardinal; 965 piece:byte; 966 indp:pointer; 967 rcodep:pword):sword;cdecl;external; 968 969 function OCIStmtExecute( 970 svchp:OCISvcCtx; 971 stmtp:OCIStmt; 972 errhp:OCIError; 973 iters:cardinal; 974 rowoff:cardinal; 975 snap_in:OCISnapshot; 976 snap_out:OCISnapshot; 977 mode:cardinal):sword;cdecl;external; 978 979 function OCIDefineByPos( 980 stmtp:OCIStmt; 981 defnp:OCIDefine; 982 errhp:OCIError; 983 position:cardinal; 984 valuep:pointer; 985 value_sz:longint; 986 dty:word; 987 indp:pointer; 988 rlenp:pword; 989 rcodep:pword; 990 mode:cardinal):sword;cdecl;external; 991 992 function OCIDefineObject( 993 defnp:OCIDefine; 994 errhp:OCIError; 995 AType:OCIType; 996 pgvpp:pointer; 997 pvszsp:pcardinal; 998 indpp:pointer; 999 indszp:pcardinal):sword;cdecl;external; 1000 1001 function OCIDefineDynamic( 1002 defnp:OCIDefine; 1003 errhp:OCIError; 1004 octxp:pointer; 1005 ocbfp:OCICallbackDefine):sword;cdecl;external; 1006 1007 function OCIDefineArrayOfStruct( 1008 defnp:OCIDefine; 1009 errhp:OCIError; 1010 pvskip:cardinal; 1011 indskip:cardinal; 1012 rlskip:cardinal; 1013 rcskip:cardinal):sword;cdecl;external; 1014 1015 function OCIStmtFetch( 1016 stmtp:OCIStmt; 1017 errhp:OCIError; 1018 nrows:cardinal; 1019 orientation:word; 1020 mode:cardinal):sword;cdecl;external; 1021 1022 function OCIStmtGetBindInfo( 1023 stmtp:OCIStmt; 1024 errhp:OCIError; 1025 size:cardinal; 1026 startloc:cardinal; 1027 found:plongint; 1028 bvnp:PChar; 1029 bvnl:byte; 1030 invp:PChar; 1031 inpl:byte; 1032 dupl:byte; 1033 hndl:OCIBind):sword;cdecl;external; 1034 1035 function OCIDescribeAny( 1036 svchp:OCISvcCtx; 1037 errhp:OCIError; 1038 objptr:pointer; 1039 objnm_len:cardinal; 1040 objptr_typ:byte; 1041 info_level:byte; 1042 objtyp:byte; 1043 dschp:OCIDescribe):sword;cdecl;external; 1044 1045 function OCIParamGet( 1046 hndlp:pointer; 1047 htype:cardinal; 1048 errhp:OCIError; 1049 parmdpp:pointer; 1050 pos:cardinal):sword;cdecl;external; 1051 1052 function OCIParamSet( 1053 hdlp:pointer; 1054 htyp:cardinal; 1055 errhp:OCIError; 1056 dscp:pointer; 1057 dtyp:cardinal; 1058 pos:cardinal):sword;cdecl;external; 1059 1060 function OCITransStart( 1061 svchp:OCISvcCtx; 1062 errhp:OCIError; 1063 timeout:uword; 1064 flags:cardinal):sword;cdecl;external; 1065 1066 function OCITransDetach( 1067 svchp:OCISvcCtx; 1068 errhp:OCIError; 1069 flags:cardinal):sword;cdecl;external; 1070 1071 function OCITransCommit( 1072 svchp:OCISvcCtx; 1073 errhp:OCIError; 1074 flags:cardinal):sword;cdecl;external; 1075 1076 function OCITransRollback( 1077 svchp:OCISvcCtx; 1078 errhp:OCIError; 1079 flags:cardinal):sword;cdecl;external; 1080 1081 function OCITransPrepare( 1082 svchp:OCISvcCtx; 1083 errhp:OCIError; 1084 flags:cardinal):sword;cdecl;external; 1085 1086 function OCITransForget( 1087 svchp:OCISvcCtx; 1088 errhp:OCIError; 1089 flags:cardinal):sword;cdecl;external; 1090 1091 function OCILobAppend( 1092 svchp:OCISvcCtx; 1093 errhp:OCIError; 1094 dst_locp:OCILobLocator; 1095 src_locp:OCILobLocator):sword;cdecl;external; 1096 1097 function OCILobAssign( 1098 envhp:OCIEnv; 1099 errhp:OCIError; 1100 src_locp:OCILobLocator; 1101 dst_locpp:OCILobLocator):sword;cdecl;external; 1102 1103 function OCILobCharSetForm( 1104 envhp:OCIEnv; 1105 errhp:OCIError; 1106 locp:OCILobLocator; 1107 csfrm:pbyte):sword;cdecl;external; 1108 1109 function OCILobCharSetId( 1110 envhp:OCIEnv; 1111 errhp:OCIError; 1112 locp:OCILobLocator; 1113 csid:pword):sword;cdecl;external; 1114 1115 function OCILobCopy( 1116 svchp:OCISvcCtx; 1117 errhp:OCIError; 1118 dst_locp:OCILobLocator; 1119 src_locp:OCILobLocator; 1120 amount:cardinal; 1121 dst_offset:cardinal; 1122 src_offset:cardinal):sword;cdecl;external; 1123 1124 function OCILobDisableBuffering( 1125 svchp:OCISvcCtx; 1126 errhp:OCIError; 1127 locp:OCILobLocator):sword;cdecl;external; 1128 1129 function OCILobEnableBuffering( 1130 svchp:OCISvcCtx; 1131 errhp:OCIError; 1132 locp:OCILobLocator):sword;cdecl;external; 1133 1134 function OCILobErase( 1135 svchp:OCISvcCtx; 1136 errhp:OCIError; 1137 locp:OCILobLocator; 1138 amount:pcardinal; 1139 offset:cardinal):sword;cdecl;external; 1140 1141 function OCILobFileClose( 1142 svchp:OCISvcCtx; 1143 errhp:OCIError; 1144 filep:OCILobLocator):sword;cdecl;external; 1145 1146 function OCILobFileCloseAll( 1147 svchp:OCISvcCtx; 1148 errhp:OCIError):sword;cdecl;external; 1149 1150 function OCILobFileExists( 1151 svchp:OCISvcCtx; 1152 errhp:OCIError; 1153 filep:OCILobLocator; 1154 flag:pboolean):sword;cdecl;external; 1155 1156 function OCILobFileGetName( 1157 envhp:OCIEnv; 1158 errhp:OCIError; 1159 filep:OCILobLocator; 1160 dir_alias:PChar; 1161 d_length:pword; 1162 filename:PChar; 1163 f_length:pword):sword;cdecl;external; 1164 1165 function OCILobFileIsOpen( 1166 svchp:OCISvcCtx; 1167 errhp:OCIError; 1168 filep:OCILobLocator; 1169 flag:pboolean):sword;cdecl;external; 1170 1171 function OCILobFileOpen( 1172 svchp:OCISvcCtx; 1173 errhp:OCIError; 1174 filep:OCILobLocator; 1175 mode:byte):sword;cdecl;external; 1176 1177 function OCILobFileSetName( 1178 envhp:OCIEnv; 1179 errhp:OCIError; 1180 filepp:OCILobLocator; 1181 dir_alias:PChar; 1182 d_length:word; 1183 filename:PChar; 1184 f_length:word):sword;cdecl;external; 1185 1186 function OCILobFlushBuffer( 1187 svchp:OCISvcCtx; 1188 errhp:OCIError; 1189 locp:OCILobLocator; 1190 flag:cardinal):sword;cdecl;external; 1191 1192 function OCILobGetLength( 1193 svchp:OCISvcCtx; 1194 errhp:OCIError; 1195 locp:OCILobLocator; 1196 lenp:pcardinal):sword;cdecl;external; 1197 1198 function OCILobIsEqual( 1199 envhp:OCIEnv; 1200 x:OCILobLocator; 1201 y:OCILobLocator; 1202 is_equal:pboolean):sword;cdecl;external; 1203 1204 function OCILobLoadFromFile( 1205 svchp:OCISvcCtx; 1206 errhp:OCIError; 1207 dst_locp:OCILobLocator; 1208 src_filep:OCILobLocator; 1209 amount:cardinal; 1210 dst_offset:cardinal; 1211 src_offset:cardinal):sword;cdecl;external; 1212 1213 function OCILobLocatorIsInit( 1214 envhp:OCIEnv; 1215 errhp:OCIError; 1216 locp:OCILobLocator; 1217 is_initialized:pboolean):sword;cdecl;external; 1218 1219 function OCILobRead( 1220 svchp:OCISvcCtx; 1221 errhp:OCIError; 1222 locp:OCILobLocator; 1223 amtp:pcardinal; 1224 offset:cardinal; 1225 bufp:pointer; 1226 bufl:cardinal; 1227 ctxp:pointer; 1228 cbfp:pointer; 1229 csid:word; 1230 csfrm:byte):sword;cdecl;external; 1231 1232 function OCILobTrim( 1233 svchp:OCISvcCtx; 1234 errhp:OCIError; 1235 locp:OCILobLocator; 1236 newlen:cardinal):sword;cdecl;external; 1237 1238 function OCILobWrite( 1239 svchp:OCISvcCtx; 1240 errhp:OCIError; 1241 locp:OCILobLocator; 1242 amtp:pcardinal; 1243 offset:cardinal; 1244 bufp:pointer; 1245 buflen:cardinal; 1246 piece:byte; 1247 ctxp:pointer; 1248 cbfp:pointer; 1249 csid:word; 1250 csfrm:byte):sword;cdecl;external; 1251 1252 function OCIBreak( 1253 hndlp:pointer; 1254 errhp:OCIError):sword;cdecl;external; 1255 1256 function OCIReset( 1257 hndlp:pointer; 1258 errhp:OCIError):sword;cdecl;external; 1259 1260 function OCIServerVersion( 1261 hndlp:pointer; 1262 errhp:OCIError; 1263 bufp:PChar; 1264 bufsz:cardinal; 1265 hndltype:byte):sword;cdecl;external; 1266 1267 function OCIAttrGet( 1268 trgthndlp:pointer; 1269 trghndltyp:cardinal; 1270 attributep:pointer; 1271 sizep:pcardinal; 1272 attrtype:cardinal; 1273 errhp:OCIError):sword;cdecl;external; 1274 1275 function OCIAttrSet( 1276 trgthndlp:pointer; 1277 trghndltyp:cardinal; 1278 attributep:pointer; 1279 size:cardinal; 1280 attrtype:cardinal; 1281 errhp:OCIError):sword;cdecl;external; 1282 1283 function OCISvcCtxToLda( 1284 svchp:OCISvcCtx; 1285 errhp:OCIError; 1286 ldap:pLda_Def):sword;cdecl;external; 1287 1288 function OCILdaToSvcCtx( 1289 svchpp:OCISvcCtx; 1290 errhp:OCIError; 1291 ldap:pLda_Def):sword;cdecl;external; 1292 1293 function OCIResultSetToStmt( 1294 rsetdp:OCIResult; 1295 errhp:OCIError):sword;cdecl;external; 1296 1297 function OCIDateToText( 1298 err:OCIError; 1299 date:POCIDate; 1300 fmt:PChar; 1301 fmt_length:ub1; 1302 lang_name:PChar; 1303 lang_length:ub4; 1304 buf_size:PCardinal; 1305 buf:PChar):sword;cdecl;external; 1306 1307 {-------------------------------------------------------------------------------------------} 1308 { Security Package } 1309 {-------------------------------------------------------------------------------------------} 1310 { 1311 function OCISecurityInitialize(sechandle:pOCISecurity; error_handle:OCIError):sword;cdecl; 1312 1313 function OCISecurityTerminate(sechandle:pOCISecurity; error_handle:OCIError):sword;cdecl; 1314 1315 function OCISecurityOpenWallet(osshandle:pOCISecurity; error_handle:OCIError; wrllen:size_t; wallet_resource_locator:PChar; pwdlen:size_t; 1316 password:PChar; wallet:pnzttWallet):sword;cdecl; 1317 1318 function OCISecurityCloseWallet(osshandle:pOCISecurity; error_handle:OCIError; wallet:pnzttWallet):sword;cdecl; 1319 1320 function OCISecurityCreateWallet(osshandle:pOCISecurity; error_handle:OCIError; wrllen:size_t; wallet_resource_locator:PChar; pwdlen:size_t; 1321 password:PChar; wallet:pnzttWallet):sword;cdecl; 1322 1323 function OCISecurityDestroyWallet(osshandle:pOCISecurity; error_handle:OCIError; wrllen:size_t; wallet_resource_locator:PChar; pwdlen:size_t; 1324 password:PChar):sword;cdecl; 1325 1326 function OCISecurityStorePersona(osshandle:pOCISecurity; error_handle:OCIError; persona:ppnzttPersona; wallet:pnzttWallet):sword;cdecl; 1327 1328 function OCISecurityOpenPersona(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona):sword;cdecl; 1329 1330 function OCISecurityClosePersona(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona):sword;cdecl; 1331 1332 function OCISecurityRemovePersona(osshandle:pOCISecurity; error_handle:OCIError; persona:ppnzttPersona):sword;cdecl; 1333 1334 function OCISecurityCreatePersona(osshandle:pOCISecurity; error_handle:OCIError; identity_type:nzttIdentType; cipher_type:nzttCipherType; desc:pnzttPersonaDesc; 1335 persona:ppnzttPersona):sword;cdecl; 1336 1337 function OCISecuritySetProtection(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; crypto_engine_function:nzttcef; data_unit_format:nztttdufmt; 1338 protection_info:pnzttProtInfo):sword;cdecl; 1339 1340 function OCISecurityGetProtection(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; crypto_engine_function:nzttcef; data_unit_format_ptr:pnztttdufmt; 1341 protection_info:pnzttProtInfo):sword;cdecl; 1342 1343 function OCISecurityRemoveIdentity(osshandle:pOCISecurity; error_handle:OCIError; identity_ptr:ppnzttIdentity):sword;cdecl; 1344 1345 function OCISecurityCreateIdentity(osshandle:pOCISecurity; error_handle:OCIError; AType:nzttIdentType; desc:pnzttIdentityDesc; identity_ptr:ppnzttIdentity):sword;cdecl; 1346 1347 function OCISecurityAbortIdentity(osshandle:pOCISecurity; error_handle:OCIError; identity_ptr:ppnzttIdentity):sword;cdecl; 1348 1349 function OCISecurityFreeIdentity(osshandle:pOCISecurity; error_handle:OCIError; identity_ptr:ppnzttIdentity):sword;cdecl; 1350 1351 function OCISecurityStoreTrustedIdentity(osshandle:pOCISecurity; error_handle:OCIError; identity_ptr:ppnzttIdentity; persona:pnzttPersona):sword;cdecl; 1352 1353 function OCISecuritySign(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; signature_state:nzttces; input_length:size_t; 1354 input:pbyte; buffer_block:pnzttBufferBlock):sword;cdecl; 1355 1356 function OCISecuritySignExpansion(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; inputlen:size_t; signature_length:psize_t):sword;cdecl; 1357 1358 function OCISecurityVerify(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; signature_state:nzttces; siglen:size_t; 1359 signature:pbyte; extracted_message:pnzttBufferBlock; verified:pboolean; validated:pboolean; signing_party_identity:ppnzttIdentity):sword;cdecl; 1360 1361 function OCISecurityValidate(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; identity:pnzttIdentity; validated:pboolean):sword;cdecl; 1362 1363 function OCISecuritySignDetached(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; signature_state:nzttces; input_length:size_t; 1364 input:pbyte; signature:pnzttBufferBlock):sword;cdecl; 1365 1366 function OCISecuritySignDetExpansion(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; input_length:size_t; required_buffer_length:psize_t):sword;cdecl; 1367 1368 function OCISecurityVerifyDetached(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; signature_state:nzttces; data_length:size_t; 1369 data:pbyte; siglen:size_t; signature:pbyte; verified:pboolean; validated:pboolean; 1370 signing_party_identity:ppnzttIdentity):sword;cdecl; 1371 1372 function OCISecurity_PKEncrypt(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; number_of_recipients:size_t; recipient_list:pnzttIdentity; 1373 encryption_state:nzttces; input_length:size_t; input:pbyte; encrypted_data:pnzttBufferBlock):sword;cdecl; 1374 1375 function OCISecurityPKEncryptExpansion(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; number_recipients:size_t; input_length:size_t; 1376 buffer_length_required:psize_t):sword;cdecl; 1377 1378 function OCISecurityPKDecrypt(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; encryption_state:nzttces; input_length:size_t; 1379 input:pbyte; encrypted_data:pnzttBufferBlock):sword;cdecl; 1380 1381 function OCISecurityEncrypt(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; encryption_state:nzttces; input_length:size_t; 1382 input:pbyte; encrypted_data:pnzttBufferBlock):sword;cdecl; 1383 1384 function OCISecurityEncryptExpansion(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; input_length:size_t; encrypted_data_length:psize_t):sword;cdecl; 1385 1386 function OCISecurityDecrypt(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; decryption_state:nzttces; input_length:size_t; 1387 input:pbyte; decrypted_data:pnzttBufferBlock):sword;cdecl; 1388 1389 function OCISecurityEnvelope(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; number_of_recipients:size_t; identity:pnzttIdentity; 1390 encryption_state:nzttces; input_length:size_t; input:pbyte; enveloped_data:pnzttBufferBlock):sword;cdecl; 1391 1392 function OCISecurityDeEnvelope(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; decryption_state:nzttces; input_length:size_t; 1393 input:pbyte; output_message:pnzttBufferBlock; verified:pboolean; validated:pboolean; sender_identity:ppnzttIdentity):sword;cdecl; 1394 1395 function OCISecurityKeyedHash(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; hash_state:nzttces; input_length:size_t; 1396 input:pbyte; keyed_hash:pnzttBufferBlock):sword;cdecl; 1397 1398 function OCISecurityKeyedHashExpansion(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; input_length:size_t; required_buffer_length:psize_t):sword;cdecl; 1399 1400 function OCISecurityHash(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; hash_state:nzttces; input:size_t; 1401 input_length:pbyte; hash:pnzttBufferBlock):sword;cdecl; 1402 1403 function OCISecurityHashExpansion(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; input_length:size_t; required_buffer_length:psize_t):sword;cdecl; 1404 1405 function OCISecuritySeedRandom(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; seed_length:size_t; seed:pbyte):sword;cdecl; 1406 1407 function OCISecurityRandomBytes(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; number_of_bytes_desired:size_t; random_bytes:pnzttBufferBlock):sword;cdecl; 1408 1409 function OCISecurityRandomNumber(osshandle:pOCISecurity; error_handle:OCIError; persona:pnzttPersona; random_number_ptr:puword):sword;cdecl; 1410 1411 function OCISecurityInitBlock(osshandle:pOCISecurity; error_handle:OCIError; buffer_block:pnzttBufferBlock):sword;cdecl; 1412 1413 function OCISecurityReuseBlock(osshandle:pOCISecurity; error_handle:OCIError; buffer_block:pnzttBufferBlock):sword;cdecl; 1414 1415 function OCISecurityPurgeBlock(osshandle:pOCISecurity; error_handle:OCIError; buffer_block:pnzttBufferBlock):sword;cdecl; 1416 1417 function OCISecuritySetBlock(osshandle:pOCISecurity; error_handle:OCIError; flags_to_set:uword; buffer_length:size_t; used_buffer_length:size_t; 1418 buffer:pbyte; buffer_block:pnzttBufferBlock):sword;cdecl; 1419 1420 function OCISecurityGetIdentity(osshandle:pOCISecurity; error_handle:OCIError; namelen:size_t; distinguished_name:PChar; identity:ppnzttIdentity):sword;cdecl; 1421 1422 function OCIAQEnq(svchp:OCISvcCtx; errhp:OCIError; queue_name:PChar; enqopt:pOCIAQEnqOptions; msgprop:pOCIAQMsgProperties; 1423 payload_tdo:pOCIType; payload:ppointer; payload_ind:ppointer; msgid:ppOCIRaw; flags:cardinal):sword;cdecl; 1424 1425 function OCIAQDeq(svchp:OCISvcCtx; errhp:OCIError; queue_name:PChar; deqopt:pOCIAQDeqOptions; msgprop:pOCIAQMsgProperties; 1426 payload_tdo:pOCIType; payload:ppointer; payload_ind:ppointer; msgid:ppOCIRaw; flags:cardinal):sword;cdecl; 1427} 1428 1429 {-------------------------------------------------------------------------------------------} 1430 { Datatype Mapping } 1431 {-------------------------------------------------------------------------------------------} 1432 1433implementation 1434 1435 1436end. 1437