📄 ibheader.pas
字号:
{************************************************************************}
{ }
{ Borland Delphi Visual Component Library }
{ InterBase Express core components }
{ }
{ Copyright (c) 1998-2001 Borland Software Corporation }
{ }
{ InterBase Express is based in part on the product }
{ Free IB Components, written by Gregory H. Deatz for }
{ Hoagland, Longo, Moran, Dunst & Doukas Company. }
{ Free IB Components is used under license. }
{ }
{ The contents of this file are subject to the InterBase }
{ Public License Version 1.0 (the "License"); you may not }
{ use this file except in compliance with the License. You may obtain }
{ a copy of the License at http://www.borland.com/interbase/IPL.html }
{ Software distributed under the License is distributed on }
{ an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either }
{ express or implied. See the License for the specific language }
{ governing rights and limitations under the License. }
{ The Original Code was created by InterBase Software Corporation }
{ and its successors. }
{ Portions created by Borland Software Corporation are Copyright }
{ (C) Borland Software Corporation. All Rights Reserved. }
{ Contributor(s): Jeff Overcash }
{ }
{************************************************************************}
unit IBHeader;
interface
uses
IBExternals;
const
ISC_TRUE = 1;
ISC_FALSE = 0;
DSQL_close = 1;
DSQL_drop = 2;
{$IFDEF MSWINDOWS}
IBASE_DLL = 'gds32.dll'; {do not localize}
{$ENDIF}
{$IFDEF LINUX}
IBASE_DLL = 'libgds.so.0'; {do not localize}
{$ENDIF}
const
SQLDA_VERSION1 = 1; (* pre V6.0 SQLDA *)
SQLDA_VERSION2 = 2; (* V6.0 SQLDA *)
SQL_DIALECT_V5 = 1; (* meaning is same as DIALECT_xsqlda *)
SQL_DIALECT_V6_TRANSITION = 2; (* flagging anything that is delimited
by double quotes as an error and
flagging keyword DATE as an error *)
SQL_DIALECT_V6 = 3; (* supports SQL delimited identifier,
SQLDATE/DATE, TIME, TIMESTAMP,
CURRENT_DATE, CURRENT_TIME,
CURRENT_TIMESTAMP, and 64-bit exact
numeric type *)
SQL_DIALECT_CURRENT = SQL_DIALECT_V6; (* latest IB DIALECT *)
type
(**********************************)
(** InterBase Handle Definitions **)
(**********************************)
TISC_ATT_HANDLE = PVoid;
PISC_ATT_HANDLE = ^TISC_ATT_HANDLE;
TISC_BLOB_HANDLE = PVoid;
PISC_BLOB_HANDLE = ^TISC_BLOB_HANDLE;
TISC_DB_HANDLE = PVoid;
PISC_DB_HANDLE = ^TISC_DB_HANDLE;
TISC_FORM_HANDLE = PVoid;
PISC_FORM_HANDLE = ^TISC_FORM_HANDLE;
TISC_REQ_HANDLE = PVoid;
PISC_REQ_HANDLE = ^TISC_REQ_HANDLE;
TISC_STMT_HANDLE = PVoid;
PISC_STMT_HANDLE = ^TISC_STMT_HANDLE;
TISC_SVC_HANDLE = PVoid;
PISC_SVC_HANDLE = ^TISC_SVC_HANDLE;
TISC_TR_HANDLE = PVoid;
PISC_TR_HANDLE = ^TISC_TR_HANDLE;
TISC_WIN_HANDLE = PVoid;
PISC_WIN_HANDLE = ^TISC_WIN_HANDLE;
TISC_CALLBACK = procedure;
ISC_SVC_HANDLE = ISC_LONG;
(*******************************************************************)
(* Time & Date Support *)
(*******************************************************************)
const
TIME_SECONDS_PRECISION = 10000;
TIME_SECONDS_PRECISION_SCALE = -4;
type
ISC_DATE = Long;
PISC_DATE = ^ISC_DATE;
ISC_TIME = ULong;
PISC_TIME = ^ISC_TIME;
TISC_TIMESTAMP = record
timestamp_date: ISC_DATE;
timestamp_time: ISC_TIME;
end;
PISC_TIMESTAMP = ^TISC_TIMESTAMP;
(*********************************************************************)
(** Blob id structure **)
(*********************************************************************)
TGDS_QUAD = record
gds_quad_high : ISC_LONG;
gds_quad_low : UISC_LONG;
end;
TGDS__QUAD = TGDS_QUAD;
TISC_QUAD = TGDS_QUAD;
PGDS_QUAD = ^TGDS_QUAD;
PGDS__QUAD = ^TGDS__QUAD;
PISC_QUAD = ^TISC_QUAD;
TISC_ARRAY_BOUND = record
array_bound_lower : Short;
array_bound_upper : Short;
end;
PISC_ARRAY_BOUND = ^TISC_ARRAY_BOUND;
TISC_ARRAY_DESC = record
array_desc_dtype : UChar;
array_desc_scale : Char;
array_desc_length : UShort;
array_desc_field_name : array[0..31] of Char;
array_desc_relation_name : array[0..31] of Char;
array_desc_dimensions : Short;
array_desc_flags : Short;
array_desc_bounds : array[0..15] of TISC_ARRAY_BOUND;
end; // TISC_ARRAY_DESC
PISC_ARRAY_DESC = ^TISC_ARRAY_DESC;
TISC_BLOB_DESC = record
blob_desc_subtype : Short;
blob_desc_charset : Short;
blob_desc_segment_size : Short;
blob_desc_field_name : array[0..31] of UChar;
blob_desc_relation_name : array[0..31] of UChar;
end; // TISC_BLOB_DESC
PISC_BLOB_DESC = ^TISC_BLOB_DESC;
(*****************************)
(** Blob control structure **)
(*****************************)
TISC_BLOB_CTL_SOURCE_FUNCTION = function: ISC_STATUS; // ISC_FAR
PISC_BLOB_CTL = ^TISC_BLOB_CTL; // ISC_FAR
TISC_BLOB_CTL = record
(** Source filter **)
ctl_source : TISC_BLOB_CTL_SOURCE_FUNCTION;
(** Argument to pass to source filter **)
ctl_source_handle : PISC_BLOB_CTL;
ctl_to_sub_type : Short; (** Target type **)
ctl_from_sub_type : Short; (** Source type **)
ctl_buffer_length : UShort; (** Length of buffer **)
ctl_segment_length : UShort; (** Length of current segment **)
ctl_bpb_length : UShort; (** Length of blob parameter **)
(** block **)
ctl_bpb : PChar; (** Address of blob parameter **)
(** block **)
ctl_buffer : PUChar; (** Address of segment buffer **)
ctl_max_segment : ISC_LONG; (** Length of longest segment **)
ctl_number_segments : ISC_LONG; (** Total number of segments **)
ctl_total_length : ISC_LONG; (** Total length of blob **)
ctl_status : PISC_STATUS; (** Address of status vector **)
ctl_data : array[0..7] of long; (** Application specific data **)
end;
(*****************************)
(** Blob stream definitions **)
(*****************************)
TBSTREAM = record
bstr_blob : PVoid; (** Blob handle **)
bstr_buffer : PChar; (** Address of buffer **)
bstr_ptr : PChar; (** Next character **)
bstr_length : Short; (** Length of buffer **)
bstr_cnt : Short; (** Characters in buffer **)
bstr_mode : Char; (** (mode) ? OUTPUT : INPUT **)
end;
PBSTREAM = ^TBSTREAM;
(********************************)
(** Declare the extended SQLDA **)
(********************************)
TXSQLVAR = record
sqltype : Short; (** datatype of field **)
sqlscale : Short; (** scale factor **)
sqlsubtype : Short; (** datatype subtype - BLOBs **)
(** & text types only **)
sqllen : Short; (** length of data area **)
sqldata : PChar; (** address of data **)
sqlind : PShort; (** address of indicator **)
(** variable **)
sqlname_length : Short; (** length of sqlname field **)
(** name of field, name length + space for NULL **)
sqlname : array[0..31] of Char;
relname_length : Short; (** length of relation name **)
(** field's relation name + space for NULL **)
relname : array[0..31] of Char;
ownname_length : Short; (** length of owner name **)
(** relation's owner name + space for NULL **)
ownname : array[0..31] of Char;
aliasname_length : Short; (** length of alias name **)
(** relation's alias name + space for NULL **)
aliasname : array[0..31] of Char;
end; // TXSQLVAR
PXSQLVAR = ^TXSQLVAR;
TXSQLDA = record
version : Short; (** version of this XSQLDA **)
(** XSQLDA name field **)
sqldaid : array[0..7] of Char;
sqldabc : ISC_LONG; (** length in bytes of SQLDA **)
sqln : Short; (** number of fields allocated **)
sqld : Short; (** actual number of fields **)
(** first field address **)
sqlvar : array[0..0] of TXSQLVAR;
end; // TXSQLDA
PXSQLDA = ^TXSQLDA;
(********************************************************)
(** This record type is for passing arguments to **)
(** isc_start_transaction (See docs) **)
(********************************************************)
TISC_START_TRANS = record
db_handle : PISC_DB_HANDLE;
tpb_length : UShort;
tpb_address : PChar;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -