ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/IBHeader.pas
(Generate patch)

Comparing ibx/trunk/runtime/IBHeader.pas (file contents):
Revision 16 by tony, Sun Aug 5 18:28:19 2012 UTC vs.
Revision 17 by tony, Sat Dec 28 19:22:24 2013 UTC

# Line 1 | Line 1
1 < {************************************************************************}
2 < {                                                                        }
3 < {       Borland Delphi Visual Component Library                          }
4 < {       InterBase Express core components                                }
5 < {                                                                        }
6 < {       Copyright (c) 1998-2000 Inprise Corporation                      }
7 < {                                                                        }
8 < {    InterBase Express is based in part on the product                   }
9 < {    Free IB Components, written by Gregory H. Deatz for                 }
10 < {    Hoagland, Longo, Moran, Dunst & Doukas Company.                     }
11 < {    Free IB Components is used under license.                           }
12 < {                                                                        }
13 < {    The contents of this file are subject to the InterBase              }
14 < {    Public License Version 1.0 (the "License"); you may not             }
15 < {    use this file except in compliance with the License. You            }
16 < {    may obtain a copy of the License at http://www.Inprise.com/IPL.html }
17 < {    Software distributed under the License is distributed on            }
18 < {    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either              }
19 < {    express or implied. See the License for the specific language       }
20 < {    governing rights and limitations under the License.                 }
21 < {    The Original Code was created by InterBase Software Corporation     }
22 < {       and its successors.                                              }
23 < {    Portions created by Inprise Corporation are Copyright (C) Inprise   }
24 < {       Corporation. All Rights Reserved.                                }
25 < {    Contributor(s): Jeff Overcash                                       }
26 < {                                                                        }
27 < {    IBX For Lazarus (Firebird Express)                                  }
28 < {    Contributor: Tony Whyman, MWA Software http://www.mwasoftware.co.uk }
29 < {    Portions created by MWA Software are copyright McCallum Whyman      }
30 < {    Associates Ltd 2011                                                 }
31 < {                                                                        }
32 < {************************************************************************}
33 <
34 < unit IBHeader;
35 <
36 < {$Mode Delphi}
37 <
38 < interface
39 <
40 < uses
41 <  IBExternals;
42 <
43 <
44 < const
45 <  ISC_TRUE = 1;
46 <  ISC_FALSE = 0;
47 <  DSQL_close = 1;
48 <  DSQL_drop = 2;
49 <  {$IFDEF LINUX}
50 <  FIREBIRD_SO2 = 'libfbclient.so.2';
51 <  {$ENDIF}
52 <  {$IFDEF DARWIN}
53 <  FIREBIRD_SO2 = 'libfbclient.dylib';
54 <  {$ENDIF}
55 <  {$IFDEF WINDOWS}
56 <  IBASE_DLL = 'gds32.dll';
57 <  FIREBIRD_CLIENT = 'fbclient.dll'; {do not localize}
58 <  FIREBIRD_EMBEDDED = 'fbembed.dll';
59 <  {$ENDIF}
60 <
61 < const
62 <  SQLDA_VERSION1               = 1; (* pre V6.0 SQLDA *)
63 <  SQLDA_VERSION2               = 2; (*     V6.0 SQLDA *)
64 <  SQL_DIALECT_V5               = 1; (* meaning is same as DIALECT_xsqlda *)
65 <  SQL_DIALECT_V6_TRANSITION    = 2; (* flagging anything that is delimited
66 <                                       by double quotes as an error and
67 <                                       flagging keyword DATE as an error *)
68 <  SQL_DIALECT_V6               = 3; (* supports SQL delimited identifier,
69 <                                       SQLDATE/DATE, TIME, TIMESTAMP,
70 <                                       CURRENT_DATE, CURRENT_TIME,
71 <                                       CURRENT_TIMESTAMP, and 64-bit exact
72 <                                       numeric type *)
73 <  SQL_DIALECT_CURRENT          = SQL_DIALECT_V6; (* latest IB DIALECT *)
74 <
75 <
76 < type
77 <  (**********************************)
78 <  (** InterBase Handle Definitions **)
79 <  (**********************************)
80 <  TISC_ATT_HANDLE               = FB_API_HANDLE;
81 <  PISC_ATT_HANDLE               = ^TISC_ATT_HANDLE;
82 <  TISC_BLOB_HANDLE              = FB_API_HANDLE;
83 <  PISC_BLOB_HANDLE              = ^TISC_BLOB_HANDLE;
84 <  TISC_DB_HANDLE                = FB_API_HANDLE;
85 <  PISC_DB_HANDLE                = ^TISC_DB_HANDLE;
86 <  TISC_FORM_HANDLE              = FB_API_HANDLE;
87 <  PISC_FORM_HANDLE              = ^TISC_FORM_HANDLE;
88 <  TISC_REQ_HANDLE               = FB_API_HANDLE;
89 <  PISC_REQ_HANDLE               = ^TISC_REQ_HANDLE;
90 <  TISC_STMT_HANDLE              = FB_API_HANDLE;
91 <  PISC_STMT_HANDLE              = ^TISC_STMT_HANDLE;
92 <  TISC_SVC_HANDLE               = FB_API_HANDLE;
93 <  PISC_SVC_HANDLE               = ^TISC_SVC_HANDLE;
94 <  TISC_TR_HANDLE                = FB_API_HANDLE;
95 <  PISC_TR_HANDLE                = ^TISC_TR_HANDLE;
96 <  TISC_WIN_HANDLE               = FB_API_HANDLE;
97 <  PISC_WIN_HANDLE               = ^TISC_WIN_HANDLE;
98 <  TISC_CALLBACK                 = procedure;
99 <  ISC_SVC_HANDLE               = ISC_LONG;
100 <
101 <  (*******************************************************************)
102 <  (* Time & Date Support                                             *)
103 <  (*******************************************************************)
104 < const
105 <  TIME_SECONDS_PRECISION       = 10000;
106 <  TIME_SECONDS_PRECISION_SCALE = -4;
107 <
108 < type
109 <  ISC_DATE = Long;
110 <  PISC_DATE = ^ISC_DATE;
111 <  ISC_TIME = ULong;
112 <  PISC_TIME = ^ISC_TIME;
113 <  TISC_TIMESTAMP = record
114 <    timestamp_date: ISC_DATE;
115 <    timestamp_time: ISC_TIME;
116 <  end;
117 <  PISC_TIMESTAMP = ^TISC_TIMESTAMP;
118 <
119 <  (*********************************************************************)
120 <  (** Blob id structure                                               **)
121 <  (*********************************************************************)
122 <  TGDS_QUAD = record
123 <    gds_quad_high      : ISC_LONG;
124 <    gds_quad_low       : UISC_LONG;
125 <  end;
126 <  TGDS__QUAD           = TGDS_QUAD;
127 <  TISC_QUAD            = TGDS_QUAD;
128 <  PGDS_QUAD            = ^TGDS_QUAD;
129 <  PGDS__QUAD           = ^TGDS__QUAD;
130 <  PISC_QUAD            = ^TISC_QUAD;
131 <
132 <  TISC_ARRAY_BOUND = record
133 <    array_bound_lower  : short;
134 <    array_bound_upper  : short;
135 <  end;
136 <  PISC_ARRAY_BOUND     = ^TISC_ARRAY_BOUND;
137 <  TISC_ARRAY_DESC = record
138 <    array_desc_dtype            : UChar;
139 <    array_desc_scale            : Char;
140 <    array_desc_length           : UShort;
141 <    array_desc_field_name       : array[0..31] of Char;
142 <    array_desc_relation_name    : array[0..31] of Char;
143 <    array_desc_dimensions       : Short;
144 <    array_desc_flags            : Short;
145 <    array_desc_bounds           : array[0..15] of TISC_ARRAY_BOUND;
146 <  end; // TISC_ARRAY_DESC
147 <  PISC_ARRAY_DESC = ^TISC_ARRAY_DESC;
148 <
149 <  TISC_BLOB_DESC = record
150 <    blob_desc_subtype           : Short;
151 <    blob_desc_charset           : Short;
152 <    blob_desc_segment_size      : Short;
153 <    blob_desc_field_name        : array[0..31] of UChar;
154 <    blob_desc_relation_name     : array[0..31] of UChar;
155 <  end; // TISC_BLOB_DESC
156 <  PISC_BLOB_DESC = ^TISC_BLOB_DESC;
157 <
158 <  (*****************************)
159 <  (** Blob control structure  **)
160 <  (*****************************)
161 <  TISC_BLOB_CTL_SOURCE_FUNCTION = function: ISC_STATUS; // ISC_FAR
162 <  PISC_BLOB_CTL                 = ^TISC_BLOB_CTL;        // ISC_FAR
163 <  TISC_BLOB_CTL = record
164 <    (** Source filter **)
165 <    ctl_source                  : TISC_BLOB_CTL_SOURCE_FUNCTION;
166 <    (** Argument to pass to source filter **)
167 <    ctl_source_handle           : PISC_BLOB_CTL;
168 <    ctl_to_sub_type             : Short;        (** Target type **)
169 <    ctl_from_sub_type           : Short;        (** Source type **)
170 <    ctl_buffer_length           : UShort;       (** Length of buffer **)
171 <    ctl_segment_length          : UShort;       (** Length of current segment **)
172 <    ctl_bpb_length              : UShort;       (** Length of blob parameter **)
173 <                                                (** block **)
174 <    ctl_bpb                     : PChar;        (** Address of blob parameter **)
175 <                                                (** block **)
176 <    ctl_buffer                  : PUChar;       (** Address of segment buffer **)
177 <    ctl_max_segment             : ISC_LONG;     (** Length of longest segment **)
178 <    ctl_number_segments         : ISC_LONG;     (** Total number of segments **)
179 <    ctl_total_length            : ISC_LONG;     (** Total length of blob **)
180 <    ctl_status                  : PISC_STATUS;  (** Address of status vector **)
181 <    ctl_data                    : array[0..7] of long; (** Application specific data **)
182 <  end;
183 <  (*****************************)
184 <  (** Blob stream definitions **)
185 <  (*****************************)
186 <  TBSTREAM = record
187 <    bstr_blob                   : PVoid;        (** Blob handle **)
188 <    bstr_buffer                 : PChar;        (** Address of buffer **)
189 <    bstr_ptr                    : PChar;        (** Next character **)
190 <    bstr_length                 : Short;        (** Length of buffer **)
191 <    bstr_cnt                    : Short;        (** Characters in buffer **)
192 <    bstr_mode                   : Char;         (** (mode) ? OUTPUT : INPUT **)
193 <  end;
194 <  PBSTREAM                      = ^TBSTREAM;
195 <
196 <  (*****************************)
197 <  (** Dynamic SQL definitions **)
198 <  (*****************************)
199 < {$IFDEF IB5_ONLY}
200 <  TSQLVAR = record
201 <    sqltype                     : Short;
202 <    sqllen                      : Short;
203 <    sqldata                     : PChar;
204 <    sqlind                      : PShort;
205 <    sqlname_length              : Short;
206 <    sqlname                     : array[0..29] of Char;
207 <  end;
208 <  PSQLVAR                       = ^TSQLVAR;
209 <
210 <  TSQLDA = record
211 <    sqldaid                     : array[0..7] of Char;
212 <    sqldabc                     : ISC_LONG;
213 <    sqln                        : Short;
214 <    sqld                        : Short;
215 <    sqlvar                      : array[0..0] of TSQLVAR;
216 <  end;
217 <  PSQLDA                         = ^TSQLDA;
218 < {$ENDIF}
219 <
220 <  (********************************)
221 <  (** Declare the extended SQLDA **)
222 <  (********************************)
223 <  TXSQLVAR = record
224 <    sqltype                     : Short;     (** datatype of field **)
225 <    sqlscale                    : Short;     (** scale factor **)
226 <    sqlsubtype                  : Short;     (** datatype subtype - BLOBs **)
227 <                                             (** & text types only **)
228 <    sqllen                      : Short;     (** length of data area **)
229 <    sqldata                     : PChar;     (** address of data **)
230 <    sqlind                      : PShort;    (** address of indicator **)
231 <                                             (** variable **)
232 <    sqlname_length              : Short;     (** length of sqlname field **)
233 <    (** name of field, name length + space for NULL **)
234 <    sqlname                     : array[0..31] of Char;
235 <    relname_length              : Short;     (** length of relation name **)
236 <    (** field's relation name + space for NULL **)
237 <    relname                     : array[0..31] of Char;
238 <    ownname_length              : Short;     (** length of owner name **)
239 <    (** relation's owner name + space for NULL **)
240 <    ownname                     : array[0..31] of Char;
241 <    aliasname_length            : Short;     (** length of alias name **)
242 <    (** relation's alias name + space for NULL **)
243 <    aliasname                   : array[0..31] of Char;
244 <  end;  // TXSQLVAR
245 <  PXSQLVAR                      = ^TXSQLVAR;
246 <
247 <  TXSQLDA = record
248 <    version                     : Short;     (** version of this XSQLDA **)
249 <    (** XSQLDA name field **)
250 <    sqldaid                     : array[0..7] of Char;
251 <    sqldabc                     : ISC_LONG;  (** length in bytes of SQLDA **)
252 <    sqln                        : Short;     (** number of fields allocated **)
253 <    sqld                        : Short;     (** actual number of fields **)
254 <    (** first field address **)
255 <    sqlvar                      : array[0..0] of TXSQLVAR;
256 <  end; // TXSQLDA
257 <  PXSQLDA                       = ^TXSQLDA;
258 <
259 < (********************************************************)
260 < (** This record type is for passing arguments to       **)
261 < (** isc_start_transaction (See docs)                   **)
262 < (********************************************************)
263 <  TISC_START_TRANS = record
264 <    db_handle      : PISC_DB_HANDLE;
265 <    tpb_length     : UShort;
266 <    tpb_address    : PChar;
267 <  end;
268 <
269 < (********************************************************)
270 < (** This record type is for passing arguments to       **)
271 < (** isc_start_multiple (see docs)                      **)
272 < (********************************************************)
273 <  TISC_TEB = record
274 <    db_handle      : PISC_DB_HANDLE;
275 <    tpb_length     : Long;
276 <    tpb_address    : PChar;
277 <  end;
278 <  PISC_TEB = ^TISC_TEB;
279 <  TISC_TEB_ARRAY = array[0..0] of TISC_TEB;
280 <  PISC_TEB_ARRAY = ^TISC_TEB_ARRAY;
281 <
282 < (*****************************)
283 < (** OSRI database functions **)
284 < (*****************************)
285 <
286 < Tisc_attach_database = function (status_vector            : PISC_STATUS;
287 <                                 db_name_length           : Short;
288 <                                 db_name                  : PChar;
289 <                                 db_handle                : PISC_DB_HANDLE;
290 <                                 parm_buffer_length       : Short;
291 <                                 parm_buffer              : PChar): ISC_STATUS;
292 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
293 <
294 < Tisc_array_gen_sdl = function   (status_vector            : PISC_STATUS;
295 <                                 isc_array_desc           : PISC_ARRAY_DESC;
296 <                                 isc_arg3                 : PShort;
297 <                                 isc_arg4                 : PChar;
298 <                                 isc_arg5                 : PShort): ISC_STATUS;
299 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
300 <
301 < Tisc_array_get_slice = function (status_vector            : PISC_STATUS;
302 <                                 db_handle                : PISC_DB_HANDLE;
303 <                                 trans_handle             : PISC_TR_HANDLE;
304 <                                 array_id                 : PISC_QUAD;
305 <                                 descriptor               : PISC_ARRAY_DESC;
306 <                                 dest_array               : PVoid;
307 <                                 slice_length             : ISC_LONG): ISC_STATUS;
308 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
309 <
310 < Tisc_array_lookup_bounds = function (status_vector        : PISC_STATUS;
311 <                                 db_handle                : PISC_DB_HANDLE;
312 <                                 trans_handle             : PISC_TR_HANDLE;
313 <                                 table_name,
314 <                                 column_name              : PChar;
315 <                                 descriptor               : PISC_ARRAY_DESC): ISC_STATUS;
316 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
317 <
318 < Tisc_array_lookup_desc = function (status_vector          : PISC_STATUS;
319 <                                 db_handle                : PISC_DB_HANDLE;
320 <                                 trans_handle             : PISC_TR_HANDLE;
321 <                                 table_name,
322 <                                 column_name              : PChar;
323 <                                 descriptor               : PISC_ARRAY_DESC): ISC_STATUS;
324 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
325 <
326 < Tisc_array_set_desc = function  (status_vector            : PISC_STATUS;
327 <                                 table_name               : PChar;
328 <                                 column_name              : PChar;
329 <                                 sql_dtype,
330 <                                 sql_length,
331 <                                 sql_dimensions           : PShort;
332 <                                 descriptor               : PISC_ARRAY_DESC): ISC_STATUS;
333 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
334 <
335 < Tisc_array_put_slice = function (status_vector            : PISC_STATUS;
336 <                                 db_handle                : PISC_DB_HANDLE;
337 <                                 trans_handle             : PISC_TR_HANDLE;
338 <                                 array_id                 : PISC_QUAD;
339 <                                 descriptor               : PISC_ARRAY_DESC;
340 <                                 source_array             : PVoid;
341 <                                 slice_length             : PISC_LONG): ISC_STATUS;
342 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
343 <
344 < Tisc_blob_default_desc = procedure  (descriptor           : PISC_BLOB_DESC;
345 <                                 table_name               : PUChar;
346 <                                 column_name              : PUChar);
347 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
348 <
349 < Tisc_blob_gen_bpb = function    (status_vector            : PISC_STATUS;
350 <                                 to_descriptor,
351 <                                 from_descriptor          : PISC_BLOB_DESC;
352 <                                 bpb_buffer_length        : UShort;
353 <                                 bpb_buffer               : PUChar;
354 <                                 bpb_length               : PUShort): ISC_STATUS;
355 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
356 <
357 < Tisc_blob_info = function       (status_vector            : PISC_STATUS;
358 <                                 blob_handle              : PISC_BLOB_HANDLE;
359 <                                 item_list_buffer_length  : Short;
360 <                                 item_list_buffer         : PChar;
361 <                                 result_buffer_length     : Short;
362 <                                 result_buffer            : PChar): ISC_STATUS;
363 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
364 <
365 < Tisc_blob_lookup_desc = function (status_vector           : PISC_STATUS;
366 <                                 db_handle                : PISC_DB_HANDLE;
367 <                                 trans_handle             : PISC_TR_HANDLE;
368 <                                 table_name,
369 <                                 column_name              : PChar;
370 <                                 descriptor               : PISC_BLOB_DESC;
371 <                                 global                   : PUChar): ISC_STATUS;
372 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
373 <
374 < Tisc_blob_set_desc = function   (status_vector            : PISC_STATUS;
375 <                                 table_name,
376 <                                 column_name              : PChar;
377 <                                 subtype,
378 <                                 charset,
379 <                                 segment_size             : Short;
380 <                                 descriptor               : PISC_BLOB_DESC): ISC_STATUS;
381 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
382 <
383 < Tisc_cancel_blob = function     (status_vector            : PISC_STATUS;
384 <                                 blob_handle              : PISC_BLOB_HANDLE): ISC_STATUS;
385 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
386 <
387 < Tisc_cancel_events = function   (status_vector            : PISC_STATUS;
388 <                                 db_handle                : PISC_DB_HANDLE;
389 <                                 event_id                 : PISC_LONG): ISC_STATUS;
390 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
391 <
392 < Tisc_close_blob = function      (status_vector            : PISC_STATUS;
393 <                                 blob_handle              : PISC_BLOB_HANDLE): ISC_STATUS;
394 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
395 <
396 < Tisc_commit_retaining = function (status_vector           : PISC_STATUS;
397 <                                 tran_handle              : PISC_TR_HANDLE): ISC_STATUS;
398 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
399 <
400 < Tisc_commit_transaction = function  (status_vector        : PISC_STATUS;
401 <                                 tran_handle              : PISC_TR_HANDLE): ISC_STATUS;
402 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
403 <
404 < Tisc_create_blob = function     (status_vector            : PISC_STATUS;
405 <                                 db_handle                : PISC_DB_HANDLE;
406 <                                 tran_handle              : PISC_TR_HANDLE;
407 <                                 blob_handle              : PISC_BLOB_HANDLE;
408 <                                 blob_id                  : PISC_QUAD): ISC_STATUS;
409 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
410 <
411 < Tisc_create_blob2 = function    (status_vector            : PISC_STATUS;
412 <                                 db_handle                : PISC_DB_HANDLE;
413 <                                 tran_handle              : PISC_TR_HANDLE;
414 <                                 blob_handle              : PISC_BLOB_HANDLE;
415 <                                 blob_id                  : PISC_QUAD;
416 <                                 bpb_length               : Short;
417 <                                 bpb_address              : PChar): ISC_STATUS;
418 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
419 <
420 < Tisc_create_database = function (status_vector            : PISC_STATUS;
421 <                                 isc_arg2                 : Short;
422 <                                 isc_arg3                 : PChar;
423 <                                 db_handle                : PISC_DB_HANDLE;
424 <                                 isc_arg5                 : Short;
425 <                                 isc_arg6                 : PChar;
426 <                                 isc_arg7                 : Short): ISC_STATUS;
427 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
428 <
429 < Tisc_database_info = function   (status_vector            : PISC_STATUS;
430 <                                 db_handle                : PISC_DB_HANDLE;
431 <                                 item_list_buffer_length  : Short;
432 <                                 item_list_buffer         : PChar;
433 <                                 result_buffer_length     : Short;
434 <                                 result_buffer            : PChar): ISC_STATUS;
435 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
436 <
437 < Tisc_decode_date = procedure    (ib_date: PISC_QUAD;
438 <                                 tm_date: PCTimeStructure);
439 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
440 <
441 < Tisc_decode_sql_date = procedure (ib_date: PISC_DATE;
442 <                                 tm_date: PCTimeStructure);
443 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
444 <
445 < Tisc_decode_sql_time = procedure  (ib_time: PISC_TIME;
446 <                                 tm_date: PCTimeStructure);
447 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
448 <
449 < Tisc_decode_timestamp = procedure  (ib_timestamp: PISC_TIMESTAMP;
450 <                                 tm_date: PCTimeStructure);
451 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
452 <
453 < Tisc_detach_database = function (status_vector            : PISC_STATUS;
454 <                                 db_handle                : PISC_DB_HANDLE): ISC_STATUS;
455 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
456 <
457 < Tisc_drop_database = function   (status_vector            : PISC_STATUS;
458 <                                 db_handle                : PISC_DB_HANDLE): ISC_STATUS;
459 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
460 <
461 < Tisc_dsql_allocate_statement = function (status_vector    : PISC_STATUS;
462 <                                 db_handle                : PISC_DB_HANDLE;
463 <                                 stmt_handle              : PISC_STMT_HANDLE): ISC_STATUS;
464 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
465 <
466 < Tisc_dsql_alloc_statement2 = function (status_vector      : PISC_STATUS;
467 <                                 db_handle                : PISC_DB_HANDLE;
468 <                                 stmt_handle              : PISC_STMT_HANDLE): ISC_STATUS;
469 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
470 <
471 < Tisc_dsql_describe = function   (status_vector            : PISC_STATUS;
472 <                                 stmt_handle              : PISC_STMT_HANDLE;
473 <                                 dialect                  : UShort;
474 <                                 xsqlda                   : PXSQLDA): ISC_STATUS;
475 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
476 <
477 < Tisc_dsql_describe_bind = function  (status_vector        : PISC_STATUS;
478 <                                 stmt_handle              : PISC_STMT_HANDLE;
479 <                                 dialect                  : UShort;
480 <                                 xsqlda                   : PXSQLDA): ISC_STATUS;
481 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
482 <
483 < Tisc_dsql_exec_immed2 = function (status_vector           : PISC_STATUS;
484 <                                 db_handle                : PISC_DB_HANDLE;
485 <                                 tran_handle              : PISC_TR_HANDLE;
486 <                                 length                   : UShort;
487 <                                 statement                : PChar;
488 <                                 dialect                  : UShort;
489 <                                 in_xsqlda,
490 <                                 out_xsqlda               : PXSQLDA): ISC_STATUS;
491 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
492 <
493 < Tisc_dsql_execute = function    (status_vector            : PISC_STATUS;
494 <                                 tran_handle              : PISC_TR_HANDLE;
495 <                                 stmt_handle              : PISC_STMT_HANDLE;
496 <                                 dialect                  : UShort;
497 <                                 xsqlda                   : PXSQLDA): ISC_STATUS;
498 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
499 <
500 < Tisc_dsql_execute2 = function   (status_vector            : PISC_STATUS;
501 <                                 tran_handle              : PISC_TR_HANDLE;
502 <                                 stmt_handle              : PISC_STMT_HANDLE;
503 <                                 dialect                  : UShort;
504 <                                 in_xsqlda,
505 <                                 out_xsqlda               : PXSQLDA): ISC_STATUS;
506 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
507 <
508 < Tisc_dsql_execute_immediate = function (status_vector     : PISC_STATUS;
509 <                                 db_handle                : PISC_DB_HANDLE;
510 <                                 tran_handle              : PISC_TR_HANDLE;
511 <                                 length                   : UShort;
512 <                                 statement                : PChar;
513 <                                 dialect                  : UShort;
514 <                                 xsqlda                   : PXSQLDA): ISC_STATUS;
515 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
516 <
517 < Tisc_dsql_fetch = function      (status_vector            : PISC_STATUS;
518 <                                 stmt_handle              : PISC_STMT_HANDLE;
519 <                                 dialect                  : UShort;
520 <                                 xsqlda                   : PXSQLDA): ISC_STATUS;
521 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
522 <
523 < (*$ifdef SCROLLABLE_CURSORS*)
524 < Tisc_dsql_fetch2 = function     (status_vector            : PISC_STATUS;
525 <                                 stmt_handle              : PISC_STMT_HANDLE;
526 <                                 dialect                  : UShort;
527 <                                 xsqlda                   : PXSQLDA;
528 <                                 isc_arg5                 : UShort;
529 <                                 isc_arg6                 : Long): ISC_STATUS;
530 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
531 < (*$endif*)
532 <
533 < Tisc_dsql_finish = function    (db_handle                : PISC_DB_HANDLE): ISC_STATUS;
534 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
535 <
536 < Tisc_dsql_free_statement = function (status_vector        : PISC_STATUS;
537 <                                 stmt_handle              : PISC_STMT_HANDLE;
538 <                                 options                  : UShort): ISC_STATUS;
539 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
540 <
541 < Tisc_dsql_insert = function     (status_vector            : PISC_STATUS;
542 <                                 stmt_handle              : PISC_STMT_HANDLE;
543 <                                 arg3                     : UShort;
544 <                                 xsqlda                   : PXSQLDA): ISC_STATUS;
545 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
546 <
547 < Tisc_dsql_prepare = function    (status_vector            : PISC_STATUS;
548 <                                 tran_handle              : PISC_TR_HANDLE;
549 <                                 stmt_handle              : PISC_STMT_HANDLE;
550 <                                 length                   : UShort;
551 <                                 statement                : PChar;
552 <                                 dialect                  : UShort;
553 <                                 xsqlda                   : PXSQLDA): ISC_STATUS;
554 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
555 <
556 < Tisc_dsql_set_cursor_name = function (status_vector        : PISC_STATUS;
557 <                                 stmt_handle               : PISC_STMT_HANDLE;
558 <                                 cursor_name               : PChar;
559 <                                 _type                     : UShort): ISC_STATUS;
560 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
561 <
562 < Tisc_dsql_sql_info = function   (status_vector             : PISC_STATUS;
563 <                                 stmt_handle               : PISC_STMT_HANDLE;
564 <                                 item_length               : Short;
565 <                                 items                     : PChar;
566 <                                 buffer_length             : Short;
567 <                                 buffer                    : PChar): ISC_STATUS;
568 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
569 <
570 < Tisc_encode_date = procedure    (tm_date                    : PCTimeStructure;
571 <                                 ib_date                    : PISC_QUAD);
572 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
573 <
574 < Tisc_encode_sql_date = procedure (tm_date                   : PCTimeStructure;
575 <                                 ib_date                    : PISC_DATE);
576 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
577 <
578 < Tisc_encode_sql_time = procedure (tm_date                   : PCTimeStructure;
579 <                                 ib_time                    : PISC_TIME);
580 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
581 <
582 < Tisc_encode_timestamp = procedure (tm_date                  : PCTimeStructure;
583 <                                 ib_timestamp               : PISC_TIMESTAMP);
584 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
585 <
586 < Tisc_event_block = function     (event_buffer               : PPChar;
587 <                                 result_buffer              : PPChar;
588 <                                 id_count                   : UShort):ISC_LONG;
589 <                                 varargs; cdecl;
590 <
591 < Tisc_event_counts = procedure   (status_vector             : PISC_LONG;
592 <                                 buffer_length             : Short;
593 <                                 event_buffer              : PChar;
594 <                                 result_buffer             : PChar);
595 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
596 <
597 < Tisc_expand_dpb = procedure     (dpb                       : PPChar;
598 <                                 dpb_length                : PShort;
599 <                                 item_list                 : array of Pointer);
600 <                                cdecl;
601 <
602 < Tisc_modify_dpb = function      (dpb                       : PPChar;
603 <                                 isc_arg2,
604 <                                 isc_arg3                  : PShort;
605 <                                 isc_arg4                  : UShort;
606 <                                 isc_arg5                  : PChar;
607 <                                 isc_arg6                  : Short): Int;
608 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
609 <
610 < Tisc_free = function           (isc_arg1                  : PChar): ISC_LONG;
611 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
612 <
613 < Tisc_get_segment = function     (status_vector             : PISC_STATUS;
614 <                                 blob_handle               : PISC_BLOB_HANDLE;
615 <                                 actual_seg_length         : PUShort;
616 <                                 seg_buffer_length         : UShort;
617 <                                 seg_buffer                : PChar): ISC_STATUS;
618 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
619 <
620 < Tisc_get_slice = function       (status_vector             : PISC_STATUS;
621 <                                 db_handle                 : PISC_DB_HANDLE;
622 <                                 tran_handle               : PISC_TR_HANDLE;
623 <                                 isc_arg4                  : PISC_QUAD;
624 <                                 isc_arg5                  : Short;
625 <                                 isc_arg6                  : PChar;
626 <                                 isc_arg7                  : Short;
627 <                                 isc_arg8                  : PISC_LONG;
628 <                                 isc_arg9                  : ISC_LONG;
629 <                                 isc_arg10                 : PVoid;
630 <                                 isc_arg11                 : PISC_LONG): ISC_STATUS;
631 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
632 <
633 < Tisc_interprete = function      (buffer                    : PChar;
634 <                                 status_vector             : PPISC_STATUS): ISC_STATUS;
635 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
636 <
637 < Tisc_open_blob = function       (status_vector             : PISC_STATUS;
638 <                                 db_handle                 : PISC_DB_HANDLE;
639 <                                 tran_handle               : PISC_TR_HANDLE;
640 <                                 blob_handle               : PISC_BLOB_HANDLE;
641 <                                 blob_id                   : PISC_QUAD): ISC_STATUS;
642 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
643 <
644 < Tisc_open_blob2 = function      (status_vector             : PISC_STATUS;
645 <                                 db_handle                 : PISC_DB_HANDLE;
646 <                                 tran_handle               : PISC_TR_HANDLE;
647 <                                 blob_handle               : PISC_BLOB_HANDLE;
648 <                                 blob_id                   : PISC_QUAD;
649 <                                 bpb_length                : Short;
650 <                                 bpb_buffer                : PChar): ISC_STATUS;
651 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
652 <
653 < Tisc_prepare_transaction2 = function (status_vector        : PISC_STATUS;
654 <                                 tran_handle               : PISC_TR_HANDLE;
655 <                                 msg_length                : Short;
656 <                                 msg                       : PChar): ISC_STATUS;
657 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
658 <
659 < Tisc_print_sqlerror = procedure (sqlcode                   : Short;
660 <                                 status_vector             : PISC_STATUS);
661 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
662 <
663 < Tisc_print_status = function   (status_vector              : PISC_STATUS): ISC_STATUS;
664 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
665 <
666 < Tisc_put_segment = function     (status_vector             : PISC_STATUS;
667 <                                 blob_handle               : PISC_BLOB_HANDLE;
668 <                                 seg_buffer_len            : UShort;
669 <                                 seg_buffer                : PChar): ISC_STATUS;
670 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
671 <
672 < Tisc_put_slice = function       (status_vector             : PISC_STATUS;
673 <                                 db_handle                 : PISC_DB_HANDLE;
674 <                                 tran_handle               : PISC_TR_HANDLE;
675 <                                 isc_arg4                  : PISC_QUAD;
676 <                                 isc_arg5                  : Short;
677 <                                 isc_arg6                  : PChar;
678 <                                 isc_arg7                  : Short;
679 <                                 isc_arg8                  : PISC_LONG;
680 <                                 isc_arg9                  : ISC_LONG;
681 <                                 isc_arg10                 : PVoid): ISC_STATUS;
682 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
683 <
684 < Tisc_que_events = function      (status_vector             : PISC_STATUS;
685 <                                 db_handle                 : PISC_DB_HANDLE;
686 <                                 event_id                  : PISC_LONG;
687 <                                 length                    : Short;
688 <                                 event_buffer              : PChar;
689 <                                 event_function            : TISC_CALLBACK;
690 <                                 event_function_arg        : PVoid): ISC_STATUS;
691 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
692 <
693 < Tisc_rollback_retaining = function (status_vector         : PISC_STATUS;
694 <                                 tran_handle              : PISC_TR_HANDLE): ISC_STATUS;
695 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
696 <
697 < Tisc_rollback_transaction = function (status_vector        : PISC_STATUS;
698 <                                 tran_handle               : PISC_TR_HANDLE): ISC_STATUS;
699 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
700 <
701 < Tisc_start_multiple = function  (status_vector             : PISC_STATUS;
702 <                                 tran_handle               : PISC_TR_HANDLE;
703 <                                 db_handle_count           : Short;
704 <                                 teb_vector_address        : PISC_TEB): ISC_STATUS;
705 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
706 <
707 < Tisc_start_transaction = function (status_vector           : PISC_STATUS;
708 <                                 tran_handle               : PISC_TR_HANDLE;
709 <                                 db_handle_count           : Short;
710 <                                 db_handle                 : PISC_DB_HANDLE;
711 <                                 tpb_length                : UShort;
712 <                                 tpb_address               : PChar): ISC_STATUS;
713 <                                cdecl;
714 <
715 < Tisc_sqlcode = function        (status_vector             : PISC_STATUS): ISC_LONG;
716 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
717 <
718 <
719 < Tisc_sql_interprete = procedure (sqlcode                   : Short;
720 <                                 buffer                    : PChar;
721 <                                 buffer_length             : Short);
722 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
723 <
724 < Tisc_transaction_info = function (status_vector            : PISC_STATUS;
725 <                                 tran_handle               : PISC_TR_HANDLE;
726 <                                 item_list_buffer_length   : Short;
727 <                                 item_list_buffer          : PChar;
728 <                                 result_buffer_length      : Short;
729 <                                 result_buffer             : PChar): ISC_STATUS;
730 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
731 <
732 < Tisc_transact_request = function (status_vector            : PISC_STATUS;
733 <                                 db_handle                 : PISC_DB_HANDLE;
734 <                                 tran_handle               : PISC_TR_HANDLE;
735 <                                 isc_arg4                  : UShort;
736 <                                 isc_arg5                  : PChar;
737 <                                 isc_arg6                  : UShort;
738 <                                 isc_arg7                  : PChar;
739 <                                 isc_arg8                  : UShort;
740 <                                 isc_arg9                  : PChar): ISC_STATUS;
741 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
742 <
743 < Tisc_vax_integer = function     (buffer                    : PChar;
744 <                                 length                    : Short): ISC_LONG;
745 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
746 <
747 < Tisc_portable_integer = function (buffer                   : PChar;
748 <                                 length                    : Short): ISC_INT64;
749 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
750 <
751 < (***************************************)
752 < (** Security Functions and structures **)
753 < (***************************************)
754 <
755 < const
756 <  sec_uid_spec                          = $01;
757 <  sec_gid_spec                          = $02;
758 <  sec_server_spec                       = $04;
759 <  sec_password_spec                     = $08;
760 <  sec_group_name_spec                   = $10;
761 <  sec_first_name_spec                   = $20;
762 <  sec_middle_name_spec                  = $40;
763 <  sec_last_name_spec                    = $80;
764 <  sec_dba_user_name_spec                = $100;
765 <  sec_dba_password_spec                 = $200;
766 <
767 <  sec_protocol_tcpip                    = 1;
768 <  sec_protocol_netbeui                  = 2;
769 <  sec_protocol_spx                      = 3;
770 <  sec_protocol_local                    = 4;
771 <
772 < type
773 <  TUserSecData = record
774 <    sec_flags: Short;                (** which fields are specified **)
775 <    uid: Int;                        (** the user's id **)
776 <    gid: int;                        (** the user's group id **)
777 <    protocol: Int;                   (** protocol to use for connection **)
778 <    server: PChar;                   (** server to administer **)
779 <    user_name: PChar;                (** the user's name **)
780 <    password: PChar;                 (** the user's password **)
781 <    group_name: PChar;               (** the group name **)
782 <    first_name: PChar;               (** the user's first name **)
783 <    middle_name: PChar;              (** the user's middle name **)
784 <    last_name: PChar;                (** the user's last name **)
785 <    dba_user_name: PChar;            (** the dba user name **)
786 <    dba_password: PChar;             (** the dba password **)
787 <  end;
788 <  PUserSecData = ^TUserSecData;
789 <
790 < Tisc_add_user = function        (status_vector             : PISC_STATUS;
791 <                                 user_sec_data             : PUserSecData): ISC_STATUS;
792 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
793 <
794 < Tisc_delete_user = function     (status_vector             : PISC_STATUS;
795 <                                 user_sec_data             : PUserSecData): ISC_STATUS;
796 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
797 <
798 < Tisc_modify_user = function     (status_vector             : PISC_STATUS;
799 <                                 user_sec_data             : PUserSecData): ISC_STATUS;
800 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
801 <
802 < (************************************)
803 < (**  Other OSRI functions          **)
804 < (************************************)
805 <
806 < Tisc_compile_request = function (status_vector             : PISC_STATUS;
807 <                                 db_handle                 : PISC_DB_HANDLE;
808 <                                 request_handle            : PISC_REQ_HANDLE;
809 <                                 isc_arg4                  : Short;
810 <                                 isc_arg5                  : PChar): ISC_STATUS;
811 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
812 <
813 < Tisc_compile_request2 = function (status_vector            : PISC_STATUS;
814 <                                 db_handle                 : PISC_DB_HANDLE;
815 <                                 request_handle            : PISC_REQ_HANDLE;
816 <                                 isc_arg4                  : Short;
817 <                                 isc_arg5                  : PChar): ISC_STATUS;
818 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
819 <
820 < Tisc_ddl = function             (status_vector             : PISC_STATUS;
821 <                                 db_handle                 : PISC_DB_HANDLE;
822 <                                 tran_handle               : PISC_TR_HANDLE;
823 <                                 isc_arg4                  : Short;
824 <                                 isc_arg5                  : PChar): ISC_STATUS;
825 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
826 <
827 < Tisc_prepare_transaction = function (status_vector         : PISC_STATUS;
828 <                                 tran_handle               : PISC_TR_HANDLE): ISC_STATUS;
829 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
830 <
831 <
832 < Tisc_receive = function         (status_vector             : PISC_STATUS;
833 <                                 request_handle            : PISC_REQ_HANDLE;
834 <                                 isc_arg3,
835 <                                 isc_arg4                  : Short;
836 <                                 isc_arg5                  : PVoid;
837 <                                 isc_arg6                  : Short): ISC_STATUS;
838 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
839 <
840 < Tisc_receive2 = function        (status_vector             : PISC_STATUS;
841 <                                 request_handle            : PISC_REQ_HANDLE;
842 <                                 isc_arg3,
843 <                                 isc_arg4                  : Short;
844 <                                 isc_arg5                  : PVoid;
845 <                                 isc_arg6,
846 <                                 isc_arg7                  : Short;
847 <                                 isc_arg8                  : Long): ISC_STATUS;
848 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
849 <
850 < Tisc_reconnect_transaction = function (status_vector       : PISC_STATUS;
851 <                                 db_handle                 : PISC_DB_HANDLE;
852 <                                 tran_handle               : PISC_TR_HANDLE;
853 <                                 isc_arg4                  : Short;
854 <                                 isc_arg5                  : PChar): ISC_STATUS;
855 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
856 <
857 < Tisc_release_request = function (status_vector             : PISC_STATUS;
858 <                                 request_handle            : PISC_REQ_HANDLE): ISC_STATUS;
859 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
860 <
861 < Tisc_request_info = function    (status_vector             : PISC_STATUS;
862 <                                 request_handle            : PISC_REQ_HANDLE;
863 <                                 isc_arg3                  : Short;
864 <                                 isc_arg4                  : Short;
865 <                                 isc_arg5                  : PChar;
866 <                                 isc_arg6                  : Short;
867 <                                 isc_arg7                  : PChar): ISC_STATUS;
868 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
869 <
870 < Tisc_seek_blob = function       (status_vector             : PISC_STATUS;
871 <                                 blob_handle               : PISC_BLOB_HANDLE;
872 <                                 isc_arg3                  : Short;
873 <                                 isc_arg4                  : ISC_LONG;
874 <                                 isc_arg5                  : PISC_LONG): ISC_STATUS;
875 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
876 <
877 < Tisc_send = function            (status_vector             : PISC_STATUS;
878 <                                 request_handle            : PISC_REQ_HANDLE;
879 <                                 isc_arg3,
880 <                                 isc_arg4                  : Short;
881 <                                 isc_arg5                  : PVoid;
882 <                                 isc_arg6                  : Short): ISC_STATUS;
883 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
884 <
885 < Tisc_start_and_send = function  (status_vector             : PISC_STATUS;
886 <                                 request_handle            : PISC_REQ_HANDLE;
887 <                                 tran_handle               : PISC_TR_HANDLE;
888 <                                 isc_arg4,
889 <                                 isc_arg5                  : Short;
890 <                                 isc_arg6                  : PVoid;
891 <                                 isc_arg7                  : Short): ISC_STATUS;
892 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
893 <
894 < Tisc_start_request = function   (status_vector             : PISC_STATUS;
895 <                                 request_handle            : PISC_REQ_HANDLE;
896 <                                 tran_handle               : PISC_TR_HANDLE;
897 <                                 isc_arg4                  : Short): ISC_STATUS;
898 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
899 <
900 < Tisc_unwind_request = function  (status_vector             : PISC_STATUS;
901 <                                 tran_handle               : PISC_TR_HANDLE;
902 <                                 isc_arg3                  : Short): ISC_STATUS;
903 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
904 <
905 < Tisc_wait_for_event = function  (status_vector             : PISC_STATUS;
906 <                                 db_handle                 : PISC_DB_HANDLE;
907 <                                 length                    : Short;
908 <                                 event_buffer,
909 <                                 result_buffer             : PChar): ISC_STATUS;
910 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
911 <
912 < (*******************************)
913 < (** Other Sql functions       **)
914 < (*******************************)
915 < {$IFDEF IB5_ONLY}
916 < Tisc_close = function           (status_vector             : PISC_STATUS;
917 <                                 isc_arg2                  : PChar): ISC_STATUS;
918 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
919 <
920 < Tisc_declare = function         (status_vector             : PISC_STATUS;
921 <                                 isc_arg2,
922 <                                 isc_arg3                  : PChar): ISC_STATUS;
923 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
924 <
925 < Tisc_describe = function        (status_vector             : PISC_STATUS;
926 <                                 isc_arg2                  : PChar;
927 <                                 isc_arg3                  : PSQLDA): ISC_STATUS;
928 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
929 <
930 < Tisc_describe_bind = function   (status_vector             : PISC_STATUS;
931 <                                 isc_arg2                  : PChar;
932 <                                 isc_arg3                  : PSQLDA): ISC_STATUS;
933 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
934 <
935 < Tisc_execute = function         (status_vector             : PISC_STATUS;
936 <                                 tran_handle               : PISC_TR_HANDLE;
937 <                                 isc_arg3                  : PChar;
938 <                                 isc_arg4                  : PSQLDA): ISC_STATUS;
939 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
940 <
941 < Tisc_execute_immediate = function (status_vector           : PISC_STATUS;
942 <                                 db_handle                 : PISC_DB_HANDLE;
943 <                                 tran_handle               : PISC_TR_HANDLE;
944 <                                 isc_arg4                  : PShort;
945 <                                 isc_arg5                  : PChar): ISC_STATUS;
946 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
947 <
948 < Tisc_fetch = function           (status_vector             : PISC_STATUS;
949 <                                 isc_arg2                  : PChar;
950 <                                 isc_arg3                  : PSQLDA): ISC_STATUS;
951 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
952 <
953 < Tisc_open = function            (status_vector             : PISC_STATUS;
954 <                                 tran_handle               : PISC_TR_HANDLE;
955 <                                 isc_arg3                  : PChar;
956 <                                 isc_arg4                  : PSQLDA): ISC_STATUS;
957 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
958 <
959 < Tisc_prepare = function         (status_vector             : PISC_STATUS;
960 <                                 db_handle                 : PISC_DB_HANDLE;
961 <                                 tran_handle               : PISC_TR_HANDLE;
962 <                                 isc_arg4                  : PChar;
963 <                                 isc_arg5                  : PShort;
964 <                                 isc_arg6                  : PChar;
965 <                                 isc_arg7                  : PSQLDA): ISC_STATUS;
966 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
967 < {$ELSE}
968 < Tisc_close = function           (status_vector             : PISC_STATUS;
969 <                                 isc_arg2                  : PChar): ISC_STATUS;
970 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
971 <
972 < Tisc_declare = function         (status_vector             : PISC_STATUS;
973 <                                 isc_arg2,
974 <                                 isc_arg3                  : PChar): ISC_STATUS;
975 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
976 <
977 < Tisc_describe = function        (status_vector             : PISC_STATUS;
978 <                                 isc_arg2                  : PChar;
979 <                                 isc_arg3                  : PXSQLDA): ISC_STATUS;
980 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
981 <
982 < Tisc_describe_bind = function   (status_vector             : PISC_STATUS;
983 <                                 isc_arg2                  : PChar;
984 <                                 isc_arg3                  : PXSQLDA): ISC_STATUS;
985 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
986 <
987 < Tisc_execute = function         (status_vector             : PISC_STATUS;
988 <                                 tran_handle               : PISC_TR_HANDLE;
989 <                                 isc_arg3                  : PChar;
990 <                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
991 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
992 <
993 < Tisc_execute_immediate = function (status_vector           : PISC_STATUS;
994 <                                 db_handle                 : PISC_DB_HANDLE;
995 <                                 tran_handle               : PISC_TR_HANDLE;
996 <                                 isc_arg4                  : PShort;
997 <                                 isc_arg5                  : PChar): ISC_STATUS;
998 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
999 <
1000 < Tisc_fetch = function           (status_vector             : PISC_STATUS;
1001 <                                 isc_arg2                  : PChar;
1002 <                                 isc_arg3                  : PXSQLDA): ISC_STATUS;
1003 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1004 <
1005 < Tisc_open = function            (status_vector             : PISC_STATUS;
1006 <                                 tran_handle               : PISC_TR_HANDLE;
1007 <                                 isc_arg3                  : PChar;
1008 <                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
1009 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1010 <
1011 < Tisc_prepare = function         (status_vector             : PISC_STATUS;
1012 <                                 db_handle                 : PISC_DB_HANDLE;
1013 <                                 tran_handle               : PISC_TR_HANDLE;
1014 <                                 isc_arg4                  : PChar;
1015 <                                 isc_arg5                  : PShort;
1016 <                                 isc_arg6                  : PChar;
1017 <                                 isc_arg7                  : PXSQLDA): ISC_STATUS;
1018 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1019 < {$ENDIF}
1020 <
1021 < (***************************************)
1022 < (** Other Dynamic sql functions       **)
1023 < (***************************************)
1024 <
1025 < Tisc_dsql_execute_m = function  (status_vector             : PISC_STATUS;
1026 <                                 tran_handle               : PISC_TR_HANDLE;
1027 <                                 statement_handle          : PISC_STMT_HANDLE;
1028 <                                 isc_arg4                  : UShort;
1029 <                                 isc_arg5                  : PChar;
1030 <                                 isc_arg6                  : UShort;
1031 <                                 isc_arg7                  : UShort;
1032 <                                 isc_arg8                  : PChar): ISC_STATUS;
1033 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1034 <
1035 < Tisc_dsql_execute2_m = function (status_vector             : PISC_STATUS;
1036 <                                 tran_handle               : PISC_TR_HANDLE;
1037 <                                 statement_handle          : PISC_STMT_HANDLE;
1038 <                                 isc_arg4                  : UShort;
1039 <                                 isc_arg5                  : PChar;
1040 <                                 isc_arg6                  : UShort;
1041 <                                 isc_arg7                  : UShort;
1042 <                                 isc_arg8                  : PChar;
1043 <                                 isc_arg9                  : UShort;
1044 <                                 isc_arg10                 : PChar;
1045 <                                 isc_arg11                 : UShort;
1046 <                                 isc_arg12                 : UShort;
1047 <                                 isc_arg13                 : PChar): ISC_STATUS;
1048 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1049 <
1050 < Tisc_dsql_execute_immediate_m = function (status_vector    : PISC_STATUS;
1051 <                                 db_handle                 : PISC_DB_HANDLE;
1052 <                                 tran_handle               : PISC_TR_HANDLE;
1053 <                                 isc_arg4                  : UShort;
1054 <                                 isc_arg5                  : PChar;
1055 <                                 isc_arg6                  : UShort;
1056 <                                 isc_arg7                  : UShort;
1057 <                                 isc_arg8                  : PChar;
1058 <                                 isc_arg9                  : UShort;
1059 <                                 isc_arg10                 : UShort;
1060 <                                 isc_arg11                 : PChar): ISC_STATUS;
1061 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1062 <
1063 < Tisc_dsql_exec_immed3_m = function  (status_vector         : PISC_STATUS;
1064 <                                 db_handle                 : PISC_DB_HANDLE;
1065 <                                 tran_handle               : PISC_TR_HANDLE;
1066 <                                 isc_arg4                  : UShort;
1067 <                                 isc_arg5                  : PChar;
1068 <                                 isc_arg6                  : UShort;
1069 <                                 isc_arg7                  : UShort;
1070 <                                 isc_arg8                  : PChar;
1071 <                                 isc_arg9                  : UShort;
1072 <                                 isc_arg10                 : UShort;
1073 <                                 isc_arg11                 : PChar;
1074 <                                 isc_arg12                 : UShort;
1075 <                                 isc_arg13                 : PChar;
1076 <                                 isc_arg14                 : UShort;
1077 <                                 isc_arg15                 : UShort;
1078 <                                 isc_arg16                 : PChar): ISC_STATUS;
1079 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1080 <
1081 < Tisc_dsql_fetch_m = function    (status_vector             : PISC_STATUS;
1082 <                                 statement_handle          : PISC_STMT_HANDLE;
1083 <                                 isc_arg3                  : UShort;
1084 <                                 isc_arg4                  : PChar;
1085 <                                 isc_arg5                  : UShort;
1086 <                                 isc_arg6                  : UShort;
1087 <                                 isc_arg7                  : PChar): ISC_STATUS;
1088 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1089 <
1090 < (*$ifdef SCROLLABLE_CURSORS*)
1091 < Tisc_dsql_fetch2_m = function   (status_vector             : PISC_STATUS;
1092 <                                 statement_handle          : PISC_STMT_HANDLE;
1093 <                                 isc_arg3                  : UShort;
1094 <                                 isc_arg4                  : PChar;
1095 <                                 isc_arg5                  : UShort;
1096 <                                 isc_arg6                  : UShort;
1097 <                                 isc_arg7                  : PChar;
1098 <                                 isc_arg8                  : UShort;
1099 <                                 isc_arg9                  : Long): ISC_STATUS;
1100 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1101 < (*$endif*)
1102 <
1103 < Tisc_dsql_insert_m = function   (status_vector             : PISC_STATUS;
1104 <                                 statement_handle          : PISC_STMT_HANDLE;
1105 <                                 isc_arg3                  : UShort;
1106 <                                 isc_arg4                  : PChar;
1107 <                                 isc_arg5                  : UShort;
1108 <                                 isc_arg6                  : UShort;
1109 <                                 isc_arg7                  : PChar): ISC_STATUS;
1110 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1111 <
1112 < Tisc_dsql_prepare_m = function  (status_vector             : PISC_STATUS;
1113 <                                 tran_handle               : PISC_TR_HANDLE;
1114 <                                 statement_handle          : PISC_STMT_HANDLE;
1115 <                                 isc_arg4                  : UShort;
1116 <                                 isc_arg5                  : PChar;
1117 <                                 isc_arg6                  : UShort;
1118 <                                 isc_arg7                  : UShort;
1119 <                                 isc_arg8                  : PChar;
1120 <                                 isc_arg9                  : UShort;
1121 <                                 isc_arg10                 : PChar): ISC_STATUS;
1122 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1123 <
1124 < Tisc_dsql_release = function    (status_vector             : PISC_STATUS;
1125 <                                 isc_arg2                  : PChar): ISC_STATUS;
1126 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1127 <
1128 < Tisc_embed_dsql_close = function(status_vector             : PISC_STATUS;
1129 <                                 isc_arg2                  : PChar): ISC_STATUS;
1130 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1131 <
1132 < Tisc_embed_dsql_declare = function  (status_vector         : PISC_STATUS;
1133 <                                 isc_arg2                  : PChar;
1134 <                                 isc_arg3                  : PChar): ISC_STATUS;
1135 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1136 <
1137 < Tisc_embed_dsql_describe = function (status_vector         : PISC_STATUS;
1138 <                                 isc_arg2                  : PChar;
1139 <                                 isc_arg3                  : UShort;
1140 <                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
1141 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1142 <
1143 < Tisc_embed_dsql_describe_bind = function (status_vector    : PISC_STATUS;
1144 <                                 isc_arg2                  : PChar;
1145 <                                 isc_arg3                  : UShort;
1146 <                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
1147 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1148 <
1149 < Tisc_embed_dsql_execute = function  (status_vector         : PISC_STATUS;
1150 <                                 tran_handle               : PISC_TR_HANDLE;
1151 <                                 isc_arg3                  : PChar;
1152 <                                 isc_arg4                  : UShort;
1153 <                                 isc_arg5                  : PXSQLDA): ISC_STATUS;
1154 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1155 <
1156 < Tisc_embed_dsql_execute2 = function (status_vector         : PISC_STATUS;
1157 <                                 tran_handle               : PISC_TR_HANDLE;
1158 <                                 isc_arg3                  : PChar;
1159 <                                 isc_arg4                  : UShort;
1160 <                                 isc_arg5                  : PXSQLDA;
1161 <                                 isc_arg6                  : PXSQLDA): ISC_STATUS;
1162 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1163 <
1164 < Tisc_embed_dsql_execute_immed = function (status_vector    : PISC_STATUS;
1165 <                                 db_handle                 : PISC_DB_HANDLE;
1166 <                                 tran_handle               : PISC_TR_HANDLE;
1167 <                                 isc_arg4                  : UShort;
1168 <                                 isc_arg5                  : PChar;
1169 <                                 isc_arg6                  : UShort;
1170 <                                 isc_arg7                  : PXSQLDA): ISC_STATUS;
1171 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1172 <
1173 < Tisc_embed_dsql_fetch = function(status_vector             : PISC_STATUS;
1174 <                                 isc_arg2                  : PChar;
1175 <                                 isc_arg3                  : UShort;
1176 <                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
1177 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1178 <
1179 < (*$ifdef SCROLLABLE_CURSORS*)
1180 < Tisc_embed_dsql_fetch2 = function  (status_vector         : PISC_STATUS;
1181 <                                isc_arg2                  : PChar;
1182 <                                isc_arg3                  : UShort;
1183 <                                isc_arg4                  : PXSQLDA;
1184 <                                isc_arg5                  : UShort;
1185 <                                isc_arg6                  : Long): ISC_STATUS;
1186 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1187 < (*$endif*)
1188 <
1189 < Tisc_embed_dsql_open = function (status_vector             : PISC_STATUS;
1190 <                                 tran_handle               : PISC_TR_HANDLE;
1191 <                                 isc_arg3                  : PChar;
1192 <                                 isc_arg4                  : UShort;
1193 <                                 isc_arg5                  : PXSQLDA): ISC_STATUS;
1194 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1195 <
1196 < Tisc_embed_dsql_open2 = function (status_vector            : PISC_STATUS;
1197 <                                 tran_handle               : PISC_TR_HANDLE;
1198 <                                 isc_arg3                  : PChar;
1199 <                                 isc_arg4                  : UShort;
1200 <                                 isc_arg5                  : PXSQLDA;
1201 <                                 isc_arg6                  : PXSQLDA): ISC_STATUS;
1202 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1203 <
1204 < Tisc_embed_dsql_insert = function (status_vector           : PISC_STATUS;
1205 <                                 isc_arg2                  : PChar;
1206 <                                 isc_arg3                  : UShort;
1207 <                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
1208 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1209 <
1210 < Tisc_embed_dsql_prepare = function  (status_vector         : PISC_STATUS;
1211 <                                 db_handle                 : PISC_DB_HANDLE;
1212 <                                 tran_handle               : PISC_TR_HANDLE;
1213 <                                 isc_arg4                  : PChar;
1214 <                                 isc_arg5                  : UShort;
1215 <                                 isc_arg6                  : PChar;
1216 <                                 isc_arg7                  : UShort;
1217 <                                 isc_arg8                  : PXSQLDA): ISC_STATUS;
1218 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1219 <
1220 < Tisc_embed_dsql_release = function  (status_vector         : PISC_STATUS;
1221 <                                 isc_arg2                  : PChar): ISC_STATUS;
1222 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1223 <
1224 < (********************************)
1225 < (** Other Blob functions       **)
1226 < (********************************)
1227 <
1228 < TBLOB_open = function           (blob_handle               : TISC_BLOB_HANDLE;
1229 <                                 isc_arg2                  : PChar;
1230 <                                 isc_arg3                  : int): PBSTREAM;
1231 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1232 <
1233 < TBLOB_put = function            (isc_arg1                  : char;
1234 <                                 isc_arg2                  : PBSTREAM): Int;
1235 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1236 <
1237 < TBLOB_close = function         (isc_arg1                  : PBSTREAM): Int;
1238 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1239 <
1240 < TBLOB_get = function           (isc_arg1                  : PBSTREAM): Int;
1241 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1242 <
1243 < TBLOB_display = function        (isc_arg1                  : PISC_QUAD;
1244 <                                 db_handle                 : TISC_DB_HANDLE;
1245 <                                 tran_handle               : TISC_TR_HANDLE;
1246 <                                 isc_arg4                  : PChar): Int;
1247 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1248 <
1249 < TBLOB_dump = function           (isc_arg1                  : PISC_QUAD;
1250 <                                 db_handle                 : TISC_DB_HANDLE;
1251 <                                 tran_handle               : TISC_TR_HANDLE;
1252 <                                 isc_arg4                  : PChar): Int;
1253 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1254 <
1255 < TBLOB_edit = function           (isc_arg1                  : PISC_QUAD;
1256 <                                 db_handle                 : TISC_DB_HANDLE;
1257 <                                 tran_handle               : TISC_TR_HANDLE;
1258 <                                 isc_arg4                  : PChar): Int;
1259 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1260 <
1261 < TBLOB_load = function           (isc_arg1                  : PISC_QUAD;
1262 <                                 db_handle                 : TISC_DB_HANDLE;
1263 <                                 tran_handle               : TISC_TR_HANDLE;
1264 <                                 isc_arg4                  : PChar): Int;
1265 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1266 <
1267 < TBLOB_text_dump = function      (isc_arg1                  : PISC_QUAD;
1268 <                                 db_handle                 : TISC_DB_HANDLE;
1269 <                                 tran_handle               : TISC_TR_HANDLE;
1270 <                                 isc_arg4                  : PChar): Int;
1271 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1272 <
1273 < TBLOB_text_load = function      (isc_arg1                  : PISC_QUAD;
1274 <                                 db_handle                 : TISC_DB_HANDLE;
1275 <                                 tran_handle               : TISC_TR_HANDLE;
1276 <                                 isc_arg4                  : PChar): Int;
1277 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1278 <
1279 < TBopen = function               (isc_arg1                  : PISC_QUAD;
1280 <                                 db_handle                 : TISC_DB_HANDLE;
1281 <                                 tran_handle               : TISC_TR_HANDLE;
1282 <                                 isc_arg4                  : PChar): Int;
1283 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1284 <
1285 < TBopen2 = function              (isc_arg1                  : PISC_QUAD;
1286 <                                 db_handle                 : TISC_DB_HANDLE;
1287 <                                 tran_handle               : TISC_TR_HANDLE;
1288 <                                 isc_arg4                  : PChar;
1289 <                                 isc_arg5                  : UShort): PBSTREAM;
1290 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1291 <
1292 < (********************************)
1293 < (** Other Misc functions       **)
1294 < (********************************)
1295 <
1296 < Tisc_ftof = function            (isc_arg1                  : PChar;
1297 <                                 isc_arg2                  : UShort;
1298 <                                 isc_arg3                  : PChar;
1299 <                                 isc_arg4                  : UShort): ISC_LONG;
1300 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1301 <
1302 < Tisc_print_blr = function       (isc_arg1                  : PChar;
1303 <                                 isc_arg2                  : TISC_CALLBACK;
1304 <                                 isc_arg3                  : PVoid;
1305 <                                 isc_arg4                  : Short): ISC_STATUS;
1306 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1307 <
1308 < Tisc_set_debug = procedure     (isc_arg1                  : Int);
1309 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1310 <
1311 < Tisc_qtoq = procedure           (isc_arg1                  : PISC_QUAD;
1312 <                                 isc_arg2                  : PISC_QUAD);
1313 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1314 <
1315 < Tisc_vtof = procedure           (isc_arg1                  : PChar;
1316 <                                 isc_arg2                  : PChar;
1317 <                                 isc_arg3                  : UShort);
1318 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1319 <
1320 < Tisc_vtov = procedure           (isc_arg1                  : PChar;
1321 <                                 isc_arg2                  : PChar;
1322 <                                 isc_arg3                  : Short);
1323 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1324 <
1325 < Tisc_version = function         (db_handle                 : PISC_DB_HANDLE;
1326 <                                 isc_arg2                  : TISC_CALLBACK;
1327 <                                 isc_arg3                  : PVoid): Int;
1328 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1329 <
1330 < Tisc_reset_fpe = function      (isc_arg1                  : UShort): ISC_LONG;
1331 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1332 <
1333 < (*******************************************)
1334 < (** Service manager functions             **)
1335 < (*******************************************)
1336 <
1337 < Tisc_service_attach = function  (status_vector             : PISC_STATUS;
1338 <                                 isc_arg2                  : UShort;
1339 <                                 isc_arg3                  : PChar;
1340 <                                 service_handle            : PISC_SVC_HANDLE;
1341 <                                 isc_arg5                  : UShort;
1342 <                                 isc_arg6                  : PChar): ISC_STATUS;
1343 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1344 <
1345 < Tisc_service_detach = function (status_vector             : PISC_STATUS;
1346 <                                service_handle            : PISC_SVC_HANDLE): ISC_STATUS;
1347 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1348 <
1349 < Tisc_service_query = function   (status_vector             : PISC_STATUS;
1350 <                                 service_handle            : PISC_SVC_HANDLE;
1351 <                                 recv_handle               : PISC_SVC_HANDLE;
1352 <                                 isc_arg4                  : UShort;
1353 <                                 isc_arg5                  : PChar;
1354 <                                 isc_arg6                  : UShort;
1355 <                                 isc_arg7                  : PChar;
1356 <                                 isc_arg8                  : UShort;
1357 <                                 isc_arg9                  : PChar): ISC_STATUS;
1358 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1359 <
1360 < Tisc_service_start = function  (status_vector             : PISC_STATUS;
1361 <                                service_handle            : PISC_SVC_HANDLE;
1362 <                                recv_handle               : PISC_SVC_HANDLE;
1363 <                                isc_arg4                  : UShort;
1364 <                                isc_arg5                  : PChar): ISC_STATUS;
1365 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1366 <
1367 < (*********************************)
1368 < (** Forms functions             **)
1369 < (*********************************)
1370 <
1371 < Tisc_compile_map = function     (status_vector             : PISC_STATUS;
1372 <                                 form_handle               : PISC_FORM_HANDLE;
1373 <                                 request_handle            : PISC_REQ_HANDLE;
1374 <                                 isc_arg4                  : PShort;
1375 <                                 isc_arg5                  : PChar): ISC_STATUS;
1376 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1377 <
1378 < Tisc_compile_menu = function    (status_vector             : PISC_STATUS;
1379 <                                 form_handle               : PISC_FORM_HANDLE;
1380 <                                 request_handle            : PISC_REQ_HANDLE;
1381 <                                 isc_arg4                  : PShort;
1382 <                                 isc_arg5                  : PChar): ISC_STATUS;
1383 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1384 <
1385 < Tisc_compile_sub_map = function (status_vector             : PISC_STATUS;
1386 <                                 win_handle                : PISC_WIN_HANDLE;
1387 <                                 request_handle            : PISC_REQ_HANDLE;
1388 <                                 isc_arg4                  : PShort;
1389 <                                 isc_arg5                  : PChar): ISC_STATUS;
1390 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1391 <
1392 < Tisc_create_window = function   (status_vector             : PISC_STATUS;
1393 <                                 win_handle                : PISC_WIN_HANDLE;
1394 <                                 isc_arg3                  : PShort;
1395 <                                 isc_arg4                  : PChar;
1396 <                                 isc_arg5                  : PShort;
1397 <                                 isc_arg6                  : PShort): ISC_STATUS;
1398 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1399 <
1400 < Tisc_delete_window = function   (status_vector             : PISC_STATUS;
1401 <                                 win_handle                : PISC_WIN_HANDLE): ISC_STATUS;
1402 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1403 <
1404 < Tisc_drive_form = function      (status_vector             : PISC_STATUS;
1405 <                                 db_handle                 : PISC_DB_HANDLE;
1406 <                                 tran_handle               : PISC_TR_HANDLE;
1407 <                                 win_handle                : PISC_WIN_HANDLE;
1408 <                                 request_handle            : PISC_REQ_HANDLE;
1409 <                                 isc_arg6                  : PUChar;
1410 <                                 isc_arg7                  : PUChar): ISC_STATUS;
1411 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1412 <
1413 < Tisc_drive_menu = function      (status_vector             : PISC_STATUS;
1414 <                                 win_handle                : PISC_WIN_HANDLE;
1415 <                                 request_handle            : PISC_REQ_HANDLE;
1416 <                                 isc_arg4                  : PShort;
1417 <                                 isc_arg5                  : PChar;
1418 <                                 isc_arg6                  : PShort;
1419 <                                 isc_arg7                  : PChar;
1420 <                                 isc_arg8                  : PShort;
1421 <                                 isc_arg9                  : PShort;
1422 <                                 isc_arg10                 : PChar;
1423 <                                 isc_arg11                 : PISC_LONG): ISC_STATUS;
1424 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1425 <
1426 < Tisc_form_delete = function     (status_vector             : PISC_STATUS;
1427 <                                 form_handle               : PISC_FORM_HANDLE): ISC_STATUS;
1428 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1429 <
1430 < Tisc_form_fetch = function      (status_vector             : PISC_STATUS;
1431 <                                 db_handle                 : PISC_DB_HANDLE;
1432 <                                 tran_handle               : PISC_TR_HANDLE;
1433 <                                 request_handle            : PISC_REQ_HANDLE;
1434 <                                 isc_arg5                  : PUChar): ISC_STATUS;
1435 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1436 <
1437 < Tisc_form_insert = function     (status_vector             : PISC_STATUS;
1438 <                                 db_handle                 : PISC_DB_HANDLE;
1439 <                                 tran_handle               : PISC_TR_HANDLE;
1440 <                                 request_handle            : PISC_REQ_HANDLE;
1441 <                                 isc_arg5                  : PUChar): ISC_STATUS;
1442 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1443 <
1444 < Tisc_get_entree = function      (status_vector             : PISC_STATUS;
1445 <                                 request_handle            : PISC_REQ_HANDLE;
1446 <                                 isc_arg3                  : PShort;
1447 <                                 isc_arg4                  : PChar;
1448 <                                 isc_arg5                  : PISC_LONG;
1449 <                                 isc_arg6                  : PShort): ISC_STATUS;
1450 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1451 <
1452 < Tisc_initialize_menu = function (status_vector             : PISC_STATUS;
1453 <                                 request_handle            : PISC_REQ_HANDLE): ISC_STATUS;
1454 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1455 <
1456 < Tisc_menu = function            (status_vector             : PISC_STATUS;
1457 <                                 win_handle                : PISC_WIN_HANDLE;
1458 <                                 request_handle            : PISC_REQ_HANDLE;
1459 <                                 isc_arg4                  : PShort;
1460 <                                 isc_arg5                  : PChar): ISC_STATUS;
1461 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1462 <
1463 < Tisc_load_form = function       (status_vector             : PISC_STATUS;
1464 <                                 db_handle                 : PISC_DB_HANDLE;
1465 <                                 tran_handle               : PISC_TR_HANDLE;
1466 <                                 form_handle               : PISC_FORM_HANDLE;
1467 <                                 isc_arg5                  : PShort;
1468 <                                 isc_arg6                  : PChar): ISC_STATUS;
1469 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1470 <
1471 < Tisc_pop_window = function      (status_vector             : PISC_STATUS;
1472 <                                 win_handle                : PISC_WIN_HANDLE): ISC_STATUS;
1473 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1474 <
1475 < Tisc_put_entree = function      (status_vector             : PISC_STATUS;
1476 <                                 request_handle            : PISC_REQ_HANDLE;
1477 <                                 isc_arg3                  : PShort;
1478 <                                 isc_arg4                  : PChar;
1479 <                                 isc_arg5                  : PISC_LONG): ISC_STATUS;
1480 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1481 <
1482 < Tisc_reset_form = function      (status_vector             : PISC_STATUS;
1483 <                                 request_handle            : PISC_REQ_HANDLE): ISC_STATUS;
1484 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1485 <
1486 < Tisc_suspend_window = function  (status_vector             : PISC_STATUS;
1487 <                                 win_handle                : PISC_WIN_HANDLE): ISC_STATUS;
1488 <                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1489 <
1490 < (** Constants!!! **)
1491 < (*****************************************************)
1492 < (** Actions to pass to the blob filter (ctl_source) **)
1493 < (*****************************************************)
1494 <
1495 < const
1496 <  isc_blob_filter_open           =          0;
1497 <  isc_blob_filter_get_segment    =          1;
1498 <  isc_blob_filter_close          =          2;
1499 <  isc_blob_filter_create         =          3;
1500 <  isc_blob_filter_put_segment    =          4;
1501 <  isc_blob_filter_alloc          =          5;
1502 <  isc_blob_filter_free           =          6;
1503 <  isc_blob_filter_seek           =          7;
1504 <
1505 < (*********************)
1506 < (** Blr definitions **)
1507 < (*********************)
1508 <
1509 <  // In pascal, how does one deal with the below "#define"?
1510 <  // blr_word(n) ((n) % 256), ((n) / 256)
1511 <  blr_text                       =         14;
1512 <  blr_text2                      =         15;
1513 <  blr_short                      =          7;
1514 <  blr_long                       =          8;
1515 <  blr_quad                       =          9;
1516 <  blr_float                      =         10;
1517 <  blr_double                     =         27;
1518 <  blr_d_float                    =         11;
1519 <  blr_timestamp                  =         35;
1520 <  blr_varying                    =         37;
1521 <  blr_varying2                   =         38;
1522 <  blr_blob                       =        261;
1523 <  blr_cstring                    =         40;
1524 <  blr_cstring2                   =         41;
1525 <  blr_blob_id                    =         45;
1526 <  blr_sql_date                   =         12;
1527 <  blr_sql_time                   =         13;
1528 <  blr_int64                      =         16;
1529 <  blr_date                       =         blr_timestamp;
1530 <
1531 <
1532 <  blr_inner                      =          0;
1533 <  blr_left                       =          1;
1534 <  blr_right                      =          2;
1535 <  blr_full                       =          3;
1536 <
1537 <  blr_gds_code                   =          0;
1538 <  blr_sql_code                   =          1;
1539 <  blr_exception                  =          2;
1540 <  blr_trigger_code               =          3;
1541 <  blr_default_code               =          4;
1542 <
1543 <  blr_version4                   =          4;
1544 <  blr_version5                   =          5;
1545 <  blr_eoc                        =         76;
1546 <  blr_end                        =         -1;
1547 <
1548 <  blr_assignment                 =          1;
1549 <  blr_begin                      =          2;
1550 <  blr_dcl_variable               =          3;
1551 <  blr_message                    =          4;
1552 <  blr_erase                      =          5;
1553 <  blr_fetch                      =          6;
1554 <  blr_for                        =          7;
1555 <  blr_if                         =          8;
1556 <  blr_loop                       =          9;
1557 <  blr_modify                     =         10;
1558 <  blr_handler                    =         11;
1559 <  blr_receive                    =         12;
1560 <  blr_select                     =         13;
1561 <  blr_send                       =         14;
1562 <  blr_store                      =         15;
1563 <  blr_label                      =         17;
1564 <  blr_leave                      =         18;
1565 <  blr_store2                     =         19;
1566 <  blr_post                       =         20;
1567 <
1568 <  blr_literal                    =         21;
1569 <  blr_dbkey                      =         22;
1570 <  blr_field                      =         23;
1571 <  blr_fid                        =         24;
1572 <  blr_parameter                  =         25;
1573 <  blr_variable                   =         26;
1574 <  blr_average                    =         27;
1575 <  blr_count                      =         28;
1576 <  blr_maximum                    =         29;
1577 <  blr_minimum                    =         30;
1578 <  blr_total                      =         31;
1579 <  blr_add                        =         34;
1580 <  blr_subtract                   =         35;
1581 <  blr_multiply                   =         36;
1582 <  blr_divide                     =         37;
1583 <  blr_negate                     =         38;
1584 <  blr_concatenate                =         39;
1585 <  blr_substring                  =         40;
1586 <  blr_parameter2                 =         41;
1587 <  blr_from                       =         42;
1588 <  blr_via                        =         43;
1589 <  blr_user_name                  =         44;
1590 <  blr_null                       =         45;
1591 <
1592 <  blr_eql                        =         47;
1593 <  blr_neq                        =         48;
1594 <  blr_gtr                        =         49;
1595 <  blr_geq                        =         50;
1596 <  blr_lss                        =         51;
1597 <  blr_leq                        =         52;
1598 <  blr_containing                 =         53;
1599 <  blr_matching                   =         54;
1600 <  blr_starting                   =         55;
1601 <  blr_between                    =         56;
1602 <  blr_or                         =         57;
1603 <  blr_and                        =         58;
1604 <  blr_not                        =         59;
1605 <  blr_any                        =         60;
1606 <  blr_missing                    =         61;
1607 <  blr_unique                     =         62;
1608 <  blr_like                       =         63;
1609 <
1610 <  blr_stream                     =         65;
1611 <  blr_set_index                  =         66;
1612 <  blr_rse                        =         67;
1613 <  blr_first                      =         68;
1614 <  blr_project                    =         69;
1615 <  blr_sort                       =         70;
1616 <  blr_boolean                    =         71;
1617 <  blr_ascending                  =         72;
1618 <  blr_descending                 =         73;
1619 <  blr_relation                   =         74;
1620 <  blr_rid                        =         75;
1621 <  blr_union                      =         76;
1622 <  blr_map                        =         77;
1623 <  blr_group_by                   =         78;
1624 <  blr_aggregate                  =         79;
1625 <  blr_join_type                  =         80;
1626 <
1627 <  blr_agg_count                  =         83;
1628 <  blr_agg_max                    =         84;
1629 <  blr_agg_min                    =         85;
1630 <  blr_agg_total                  =         86;
1631 <  blr_agg_average                =         87;
1632 <  blr_parameter3                 =         88;
1633 <  blr_run_count                  =        118;
1634 <  blr_run_max                    =         89;
1635 <  blr_run_min                    =         90;
1636 <  blr_run_total                  =         91;
1637 <  blr_run_average                =         92;
1638 <  blr_agg_count2                 =         93;
1639 <  blr_agg_count_distinct         =         94;
1640 <  blr_agg_total_distinct         =         95;
1641 <  blr_agg_average_distinct       =         96;
1642 <
1643 <  blr_function                   =        100;
1644 <  blr_gen_id                     =        101;
1645 <  blr_prot_mask                  =        102;
1646 <  blr_upcase                     =        103;
1647 <  blr_lock_state                 =        104;
1648 <  blr_value_if                   =        105;
1649 <  blr_matching2                  =        106;
1650 <  blr_index                      =        107;
1651 <  blr_ansi_like                  =        108;
1652 <  blr_bookmark                   =        109;
1653 <  blr_crack                      =        110;
1654 <  blr_force_crack                =        111;
1655 <  blr_seek                       =        112;
1656 <  blr_find                       =        113;
1657 <
1658 <  blr_continue                   =          0;
1659 <  blr_forward                    =          1;
1660 <  blr_backward                   =          2;
1661 <  blr_bof_forward                =          3;
1662 <  blr_eof_backward               =          4;
1663 <
1664 <  blr_lock_relation              =        114;
1665 <  blr_lock_record                =        115;
1666 <  blr_set_bookmark               =        116;
1667 <  blr_get_bookmark               =        117;
1668 <  blr_rs_stream                  =        119;
1669 <  blr_exec_proc                  =        120;
1670 <  blr_begin_range                =        121;
1671 <  blr_end_range                  =        122;
1672 <  blr_delete_range               =        123;
1673 <  blr_procedure                  =        124;
1674 <  blr_pid                        =        125;
1675 <  blr_exec_pid                   =        126;
1676 <  blr_singular                   =        127;
1677 <  blr_abort                      =        128;
1678 <  blr_block                      =        129;
1679 <  blr_error_handler              =        130;
1680 <  blr_cast                       =        131;
1681 <  blr_release_lock               =        132;
1682 <  blr_release_locks              =        133;
1683 <  blr_start_savepoint            =        134;
1684 <  blr_end_savepoint              =        135;
1685 <  blr_find_dbkey                 =        136;
1686 <  blr_range_relation             =        137;
1687 <  blr_delete_ranges              =        138;
1688 <
1689 <  blr_plan                       =        139;
1690 <  blr_merge                      =        140;
1691 <  blr_join                       =        141;
1692 <  blr_sequential                 =        142;
1693 <  blr_navigational               =        143;
1694 <  blr_indices                    =        144;
1695 <  blr_retrieve                   =        145;
1696 <
1697 <  blr_relation2                  =        146;
1698 <  blr_rid2                       =        147;
1699 <  blr_reset_stream               =        148;
1700 <  blr_release_bookmark           =        149;
1701 <  blr_set_generator              =        150;
1702 <  blr_ansi_any                   =        151;
1703 <  blr_exists                     =        152;
1704 <  blr_cardinality                =        153;
1705 <
1706 <  blr_record_version             =        154;          (** get tid of record **)
1707 <  blr_stall                      =        155;          (** fake server stall **)
1708 <  blr_seek_no_warn               =        156;
1709 <  blr_find_dbkey_version         =        157;
1710 <  blr_ansi_all                   =        158;
1711 <
1712 <  blr_extract                    = 159;
1713 <
1714 <  (* sub parameters for blr_extract *)
1715 <
1716 <  blr_extract_year               = 0;
1717 <  blr_extract_month              = 1;
1718 <  blr_extract_day                = 2;
1719 <  blr_extract_hour               = 3;
1720 <  blr_extract_minute             = 4;
1721 <  blr_extract_second             = 5;
1722 <  blr_extract_weekday            = 6;
1723 <  blr_extract_yearday            = 7;
1724 <
1725 <  blr_current_date               = 160;
1726 <  blr_current_timestamp          = 161;
1727 <  blr_current_time               = 162;
1728 <
1729 <  (* These verbs were added in 6.0,
1730 <  primarily to support 64-bit integers *)
1731 <
1732 <  blr_add2                  = 163;
1733 <  blr_subtract2             = 164;
1734 <  blr_multiply2             = 165;
1735 <  blr_divide2               = 166;
1736 <  blr_agg_total2            = 167;
1737 <  blr_agg_total_distinct2   = 168;
1738 <  blr_agg_average2          = 169;
1739 <  blr_agg_average_distinct2 = 170;
1740 <  blr_average2              = 171;
1741 <  blr_gen_id2               = 172;
1742 <  blr_set_generator2        = 173;
1743 <
1744 < (************************************)
1745 < (** Database parameter block stuff **)
1746 < (************************************)
1747 <
1748 <  isc_dpb_version1               =          1;
1749 <  isc_dpb_cdd_pathname           =          1;
1750 <  isc_dpb_allocation             =          2;
1751 <  isc_dpb_journal                =          3;
1752 <  isc_dpb_page_size              =          4;
1753 <  isc_dpb_num_buffers            =          5;
1754 <  isc_dpb_buffer_length          =          6;
1755 <  isc_dpb_debug                  =          7;
1756 <  isc_dpb_garbage_collect        =          8;
1757 <  isc_dpb_verify                 =          9;
1758 <  isc_dpb_sweep                  =         10;
1759 <  isc_dpb_enable_journal         =         11;
1760 <  isc_dpb_disable_journal        =         12;
1761 <  isc_dpb_dbkey_scope            =         13;
1762 <  isc_dpb_number_of_users        =         14;
1763 <  isc_dpb_trace                  =         15;
1764 <  isc_dpb_no_garbage_collect     =         16;
1765 <  isc_dpb_damaged                =         17;
1766 <  isc_dpb_license                =         18;
1767 <  isc_dpb_sys_user_name          =         19;
1768 <  isc_dpb_encrypt_key            =         20;
1769 <  isc_dpb_activate_shadow        =         21;
1770 <  isc_dpb_sweep_interval         =         22;
1771 <  isc_dpb_delete_shadow          =         23;
1772 <  isc_dpb_force_write            =         24;
1773 <  isc_dpb_begin_log              =         25;
1774 <  isc_dpb_quit_log               =         26;
1775 <  isc_dpb_no_reserve             =         27;
1776 <  isc_dpb_user_name              =         28;
1777 <  isc_dpb_password               =         29;
1778 <  isc_dpb_password_enc           =         30;
1779 <  isc_dpb_sys_user_name_enc      =         31;
1780 <  isc_dpb_interp                 =         32;
1781 <  isc_dpb_online_dump            =         33;
1782 <  isc_dpb_old_file_size          =         34;
1783 <  isc_dpb_old_num_files          =         35;
1784 <  isc_dpb_old_file               =         36;
1785 <  isc_dpb_old_start_page         =         37;
1786 <  isc_dpb_old_start_seqno        =         38;
1787 <  isc_dpb_old_start_file         =         39;
1788 <  isc_dpb_drop_walfile           =         40;
1789 <  isc_dpb_old_dump_id            =         41;
1790 <  isc_dpb_wal_backup_dir         =         42;
1791 <  isc_dpb_wal_chkptlen           =         43;
1792 <  isc_dpb_wal_numbufs            =         44;
1793 <  isc_dpb_wal_bufsize            =         45;
1794 <  isc_dpb_wal_grp_cmt_wait       =         46;
1795 <  isc_dpb_lc_messages            =         47;
1796 <  isc_dpb_lc_ctype               =         48;
1797 <  isc_dpb_cache_manager          =         49;
1798 <  isc_dpb_shutdown               =         50;
1799 <  isc_dpb_online                 =         51;
1800 <  isc_dpb_shutdown_delay         =         52;
1801 <  isc_dpb_reserved               =         53;
1802 <  isc_dpb_overwrite              =         54;
1803 <  isc_dpb_sec_attach             =         55;
1804 <  isc_dpb_disable_wal            =         56;
1805 <  isc_dpb_connect_timeout        =         57;
1806 <  isc_dpb_dummy_packet_interval  =         58;
1807 <  isc_dpb_gbak_attach            =         59;
1808 <  isc_dpb_sql_role_name          =         60;
1809 <  isc_dpb_set_page_buffers       =         61;
1810 <  isc_dpb_working_directory      =         62;
1811 <  isc_dpb_SQL_dialect            =         63;
1812 <  isc_dpb_set_db_readonly        =         64;
1813 <  isc_dpb_set_db_SQL_dialect     =         65;
1814 <  isc_dpb_gfix_attach            =         66;
1815 <  isc_dpb_gstat_attach           =         67;
1816 <  isc_dpb_last_dpb_constant      =         isc_dpb_gstat_attach;
1817 <
1818 <
1819 < (***********************************)
1820 < (** isc_dpb_verify specific flags **)
1821 < (***********************************)
1822 <
1823 <  isc_dpb_pages                  =          1;
1824 <  isc_dpb_records                =          2;
1825 <  isc_dpb_indices                =          4;
1826 <  isc_dpb_transactions           =          8;
1827 <  isc_dpb_no_update              =         16;
1828 <  isc_dpb_repair                 =         32;
1829 <  isc_dpb_ignore                 =         64;
1830 <
1831 < (*************************************)
1832 < (** isc_dpb_shutdown specific flags **)
1833 < (*************************************)
1834 <
1835 <  isc_dpb_shut_cache             =          1;
1836 <  isc_dpb_shut_attachment        =          2;
1837 <  isc_dpb_shut_transaction       =          4;
1838 <  isc_dpb_shut_force             =          8;
1839 <
1840 < (****************************************)
1841 < (** Bit assignments in RDB$SYSTEM_FLAG **)
1842 < (****************************************)
1843 <
1844 <  RDB_system                     =          1;
1845 <  RDB_id_assigned                =          2;
1846 <
1847 <
1848 < (***************************************)
1849 < (** Transaction parameter block stuff **)
1850 < (***************************************)
1851 <
1852 <  isc_tpb_version1               =          1;
1853 <  isc_tpb_version3               =          3;
1854 <  isc_tpb_consistency            =          1;
1855 <  isc_tpb_concurrency            =          2;
1856 <  isc_tpb_shared                 =          3;
1857 <  isc_tpb_protected              =          4;
1858 <  isc_tpb_exclusive              =          5;
1859 <  isc_tpb_wait                   =          6;
1860 <  isc_tpb_nowait                 =          7;
1861 <  isc_tpb_read                   =          8;
1862 <  isc_tpb_write                  =          9;
1863 <  isc_tpb_lock_read              =         10;
1864 <  isc_tpb_lock_write             =         11;
1865 <  isc_tpb_verb_time              =         12;
1866 <  isc_tpb_commit_time            =         13;
1867 <  isc_tpb_ignore_limbo           =         14;
1868 <  isc_tpb_read_committed         =         15;
1869 <  isc_tpb_autocommit             =         16;
1870 <  isc_tpb_rec_version            =         17;
1871 <  isc_tpb_no_rec_version         =         18;
1872 <  isc_tpb_restart_requests       =         19;
1873 <  isc_tpb_no_auto_undo           =         20;
1874 <  isc_tpb_last_tpb_constant      =         isc_tpb_no_auto_undo;
1875 <
1876 <
1877 < (**************************)
1878 < (** Blob Parameter Block **)
1879 < (**************************)
1880 <
1881 <  isc_bpb_version1               =          1;
1882 <  isc_bpb_source_type            =          1;
1883 <  isc_bpb_target_type            =          2;
1884 <  isc_bpb_type                   =          3;
1885 <  isc_bpb_source_interp          =          4;
1886 <  isc_bpb_target_interp          =          5;
1887 <  isc_bpb_filter_parameter       =          6;
1888 <
1889 <  isc_bpb_type_segmented         =          0;
1890 <  isc_bpb_type_stream            =          1;
1891 <
1892 <
1893 < (***********************************)
1894 < (** Service parameter block stuff **)
1895 < (***********************************)
1896 <
1897 <  isc_spb_user_name              =          1;
1898 <  isc_spb_sys_user_name          =          2;
1899 <  isc_spb_sys_user_name_enc      =          3;
1900 <  isc_spb_password               =          4;
1901 <  isc_spb_password_enc           =          5;
1902 <  isc_spb_command_line           =          6;
1903 <  isc_spb_dbname                 =          7;
1904 <  isc_spb_verbose                =          8;
1905 <  isc_spb_options                =          9;
1906 <  isc_spb_connect_timeout        =          10;
1907 <  isc_spb_dummy_packet_interval  =          11;
1908 <  isc_spb_sql_role_name          =          12;
1909 <  isc_spb_last_spb_constant      =          isc_spb_sql_role_name;
1910 <
1911 <  isc_spb_version1                                = 1;
1912 <  isc_spb_current_version                         = 2;
1913 <  isc_spb_version                                 = isc_spb_current_version;
1914 <  isc_spb_user_name_mapped_to_server              = isc_dpb_user_name;
1915 <  isc_spb_sys_user_name_mapped_to_server          = isc_dpb_sys_user_name;
1916 <  isc_spb_sys_user_name_enc_mapped_to_server      = isc_dpb_sys_user_name_enc;
1917 <  isc_spb_password_mapped_to_server               = isc_dpb_password;
1918 <  isc_spb_password_enc_mapped_to_server           = isc_dpb_password_enc;
1919 <  isc_spb_command_line_mapped_to_server           = 105;
1920 <  isc_spb_dbname_mapped_to_server                 = 106;
1921 <  isc_spb_verbose_mapped_to_server                = 107;
1922 <  isc_spb_options_mapped_to_server                = 108;
1923 <  isc_spb_connect_timeout_mapped_to_server        = isc_dpb_connect_timeout;
1924 <  isc_spb_dummy_packet_interval_mapped_to_server  = isc_dpb_dummy_packet_interval;
1925 <  isc_spb_sql_role_name_mapped_to_server          = isc_dpb_sql_role_name;
1926 <
1927 < (***********************************)
1928 < (** Information call declarations **)
1929 < (***********************************)
1930 <
1931 < (******************************)
1932 < (** Common, structural codes **)
1933 < (******************************)
1934 <
1935 <  isc_info_end                   =          1;
1936 <  isc_info_truncated             =          2;
1937 <  isc_info_error                 =          3;
1938 <  isc_info_data_not_ready        =          4;
1939 <  isc_info_flag_end              =          127;
1940 <
1941 < (********************************)
1942 < (** Database information items **)
1943 < (********************************)
1944 <
1945 <  isc_info_db_id                 =          4;
1946 <  isc_info_reads                 =          5;
1947 <  isc_info_writes                =          6;
1948 <  isc_info_fetches               =          7;
1949 <  isc_info_marks                 =          8;
1950 <  isc_info_implementation        =         11;
1951 <  isc_info_version               =         12;
1952 <  isc_info_base_level            =         13;
1953 <  isc_info_page_size             =         14;
1954 <  isc_info_num_buffers           =         15;
1955 <  isc_info_limbo                 =         16;
1956 <  isc_info_current_memory        =         17;
1957 <  isc_info_max_memory            =         18;
1958 <  isc_info_window_turns          =         19;
1959 <  isc_info_license               =         20;
1960 <  isc_info_allocation            =         21;
1961 <  isc_info_attachment_id         =         22;
1962 <  isc_info_read_seq_count        =         23;
1963 <  isc_info_read_idx_count        =         24;
1964 <  isc_info_insert_count          =         25;
1965 <  isc_info_update_count          =         26;
1966 <  isc_info_delete_count          =         27;
1967 <  isc_info_backout_count         =         28;
1968 <  isc_info_purge_count           =         29;
1969 <  isc_info_expunge_count         =         30;
1970 <  isc_info_sweep_interval        =         31;
1971 <  isc_info_ods_version           =         32;
1972 <  isc_info_ods_minor_version     =         33;
1973 <  isc_info_no_reserve            =         34;
1974 <  isc_info_logfile               =         35;
1975 <  isc_info_cur_logfile_name      =         36;
1976 <  isc_info_cur_log_part_offset   =         37;
1977 <  isc_info_num_wal_buffers       =         38;
1978 <  isc_info_wal_buffer_size       =         39;
1979 <  isc_info_wal_ckpt_length       =         40;
1980 <  isc_info_wal_cur_ckpt_interval =         41;
1981 <  isc_info_wal_prv_ckpt_fname    =         42;
1982 <  isc_info_wal_prv_ckpt_poffset  =         43;
1983 <  isc_info_wal_recv_ckpt_fname   =         44;
1984 <  isc_info_wal_recv_ckpt_poffset =         45;
1985 <  isc_info_wal_grpc_wait_usecs   =         47;
1986 <  isc_info_wal_num_io            =         48;
1987 <  isc_info_wal_avg_io_size       =         49;
1988 <  isc_info_wal_num_commits       =         50;
1989 <  isc_info_wal_avg_grpc_size     =         51;
1990 <  isc_info_forced_writes         =         52;
1991 <  isc_info_user_names            =         53;
1992 <  isc_info_page_errors           =         54;
1993 <  isc_info_record_errors         =         55;
1994 <  isc_info_bpage_errors          =         56;
1995 <  isc_info_dpage_errors          =         57;
1996 <  isc_info_ipage_errors          =         58;
1997 <  isc_info_ppage_errors          =         59;
1998 <  isc_info_tpage_errors          =         60;
1999 <  isc_info_set_page_buffers      =         61;
2000 <  isc_info_db_SQL_dialect        =         62;
2001 <  isc_info_db_read_only          =         63;
2002 <  isc_info_db_size_in_pages      =         64;
2003 <
2004 < (****************************************)
2005 < (** Database information return values **)
2006 < (****************************************)
2007 <
2008 <  isc_info_db_impl_rdb_vms       =          1;
2009 <  isc_info_db_impl_rdb_eln       =          2;
2010 <  isc_info_db_impl_rdb_eln_dev   =          3;
2011 <  isc_info_db_impl_rdb_vms_y     =          4;
2012 <  isc_info_db_impl_rdb_eln_y     =          5;
2013 <  isc_info_db_impl_jri           =          6;
2014 <  isc_info_db_impl_jsv           =          7;
2015 <  isc_info_db_impl_isc_a         =         25;
2016 <  isc_info_db_impl_isc_u         =         26;
2017 <  isc_info_db_impl_isc_v         =         27;
2018 <  isc_info_db_impl_isc_s         =         28;
2019 <  isc_info_db_impl_isc_apl_68K   =         25;
2020 <  isc_info_db_impl_isc_vax_ultr  =         26;
2021 <  isc_info_db_impl_isc_vms       =         27;
2022 <  isc_info_db_impl_isc_sun_68k   =         28;
2023 <  isc_info_db_impl_isc_os2       =         29;
2024 <  isc_info_db_impl_isc_sun4      =         30;
2025 <  isc_info_db_impl_isc_hp_ux     =         31;
2026 <  isc_info_db_impl_isc_sun_386i  =         32;
2027 <  isc_info_db_impl_isc_vms_orcl  =         33;
2028 <  isc_info_db_impl_isc_mac_aux   =         34;
2029 <  isc_info_db_impl_isc_rt_aix    =         35;
2030 <  isc_info_db_impl_isc_mips_ult  =         36;
2031 <  isc_info_db_impl_isc_xenix     =         37;
2032 <  isc_info_db_impl_isc_dg        =         38;
2033 <  isc_info_db_impl_isc_hp_mpexl  =         39;
2034 <  isc_info_db_impl_isc_hp_ux68K  =         40;
2035 <  isc_info_db_impl_isc_sgi       =         41;
2036 <  isc_info_db_impl_isc_sco_unix  =         42;
2037 <  isc_info_db_impl_isc_cray      =         43;
2038 <  isc_info_db_impl_isc_imp       =         44;
2039 <  isc_info_db_impl_isc_delta     =         45;
2040 <  isc_info_db_impl_isc_next      =         46;
2041 <  isc_info_db_impl_isc_dos       =         47;
2042 <  isc_info_db_impl_isc_winnt     =         48;
2043 <  isc_info_db_impl_isc_epson     =         49;
2044 <
2045 <  isc_info_db_class_access       =          1;
2046 <  isc_info_db_class_y_valve      =          2;
2047 <  isc_info_db_class_rem_int      =          3;
2048 <  isc_info_db_class_rem_srvr     =          4;
2049 <  isc_info_db_class_pipe_int     =          7;
2050 <  isc_info_db_class_pipe_srvr    =          8;
2051 <  isc_info_db_class_sam_int      =          9;
2052 <  isc_info_db_class_sam_srvr     =         10;
2053 <  isc_info_db_class_gateway      =         11;
2054 <  isc_info_db_class_cache        =         12;
2055 <
2056 < (*******************************)
2057 < (** Request information items **)
2058 < (*******************************)
2059 <
2060 <  isc_info_number_messages       =          4;
2061 <  isc_info_max_message           =          5;
2062 <  isc_info_max_send              =          6;
2063 <  isc_info_max_receive           =          7;
2064 <  isc_info_state                 =          8;
2065 <  isc_info_message_number        =          9;
2066 <  isc_info_message_size          =         10;
2067 <  isc_info_request_cost          =         11;
2068 <  isc_info_access_path           =         12;
2069 <  isc_info_req_select_count      =         13;
2070 <  isc_info_req_insert_count      =         14;
2071 <  isc_info_req_update_count      =         15;
2072 <  isc_info_req_delete_count      =         16;
2073 <
2074 <
2075 < (***********************)
2076 < (** Access path items **)
2077 < (***********************)
2078 <
2079 <  isc_info_rsb_end               =          0;
2080 <  isc_info_rsb_begin             =          1;
2081 <  isc_info_rsb_type              =          2;
2082 <  isc_info_rsb_relation          =          3;
2083 <  isc_info_rsb_plan              =          4;
2084 <
2085 < (***************)
2086 < (** Rsb types **)
2087 < (***************)
2088 <
2089 <  isc_info_rsb_unknown           =          1;
2090 <  isc_info_rsb_indexed           =          2;
2091 <  isc_info_rsb_navigate          =          3;
2092 <  isc_info_rsb_sequential        =          4;
2093 <  isc_info_rsb_cross             =          5;
2094 <  isc_info_rsb_sort              =          6;
2095 <  isc_info_rsb_first             =          7;
2096 <  isc_info_rsb_boolean           =          8;
2097 <  isc_info_rsb_union             =          9;
2098 <  isc_info_rsb_aggregate         =         10;
2099 <  isc_info_rsb_merge             =         11;
2100 <  isc_info_rsb_ext_sequential    =         12;
2101 <  isc_info_rsb_ext_indexed       =         13;
2102 <  isc_info_rsb_ext_dbkey         =         14;
2103 <  isc_info_rsb_left_cross        =         15;
2104 <  isc_info_rsb_select            =         16;
2105 <  isc_info_rsb_sql_join          =         17;
2106 <  isc_info_rsb_simulate          =         18;
2107 <  isc_info_rsb_sim_cross         =         19;
2108 <  isc_info_rsb_once              =         20;
2109 <  isc_info_rsb_procedure         =         21;
2110 <
2111 < (************************)
2112 < (** Bitmap expressions **)
2113 < (************************)
2114 <
2115 <  isc_info_rsb_and               =          1;
2116 <  isc_info_rsb_or                =          2;
2117 <  isc_info_rsb_dbkey             =          3;
2118 <  isc_info_rsb_index             =          4;
2119 <
2120 <  isc_info_req_active            =          2;
2121 <  isc_info_req_inactive          =          3;
2122 <  isc_info_req_send              =          4;
2123 <  isc_info_req_receive           =          5;
2124 <  isc_info_req_select            =          6;
2125 <  isc_info_req_sql_stall         =          7;
2126 <
2127 < (****************************)
2128 < (** Blob information items **)
2129 < (****************************)
2130 <
2131 <  isc_info_blob_num_segments     =          4;
2132 <  isc_info_blob_max_segment      =          5;
2133 <  isc_info_blob_total_length     =          6;
2134 <  isc_info_blob_type             =          7;
2135 <
2136 < (***********************************)
2137 < (** Transaction information items **)
2138 < (***********************************)
2139 <
2140 <  isc_info_tra_id                =          4;
2141 <
2142 < (*******************************)
2143 < (** Service information items **)
2144 < (*******************************)
2145 <
2146 < {$IFDEF IB5_ONLY }
2147 < (*  This defines are not there in version 6.0 *)
2148 < {  isc_info_svc_version           =          4;
2149 <  isc_info_svc_message           =          5;
2150 <  isc_info_svc_total_length      =          6;
2151 <  isc_info_svc_response          =          7;
2152 <  isc_info_svc_response_more     =          8;
2153 <  isc_info_svc_line              =          9;
2154 <  isc_info_svc_to_eof            =         10;
2155 <  isc_info_svc_timeout           =         11;
2156 <  isc_info_svc_server_version    =         12;
2157 <  isc_info_svc_implementation    =         13;
2158 <  isc_info_svc_capabilities      =         14;
2159 <  isc_info_svc_user_dbpath       =         15;
2160 <  isc_info_svc_svr_db_info       =         16;
2161 <  isc_info_svc_svr_online        =         17;
2162 <  isc_info_svc_svr_offline       =         18;
2163 <  isc_info_svc_get_config        =         19;
2164 <  isc_info_svc_set_config        =         20;
2165 <  isc_info_svc_default_config    =         21;
2166 <  isc_info_svc_get_env           =         22;
2167 <  isc_info_svc_get_env_lock      =         23;
2168 <  isc_info_svc_get_env_msg       =         24; }
2169 < {$ENDIF}
2170 <
2171 < (*****************************************)
2172 < (* Service action items                 **)
2173 < (*****************************************)
2174 <
2175 <  isc_action_svc_backup         = 1; (* Starts database backup process on the server *)
2176 <  isc_action_svc_restore        = 2; (* Starts database restore process on the server *)
2177 <  isc_action_svc_repair         = 3; (* Starts database repair process on the server *)
2178 <  isc_action_svc_add_user       = 4; (* Adds a new user to the security database *)
2179 <  isc_action_svc_delete_user    = 5; (* Deletes a user record from the security database *)
2180 <  isc_action_svc_modify_user    = 6; (* Modifies a user record in the security database *)
2181 <  isc_action_svc_display_user   = 7; (* Displays a user record from the security database *)
2182 <  isc_action_svc_properties     = 8; (* Sets database properties *)
2183 <  isc_action_svc_add_license    = 9; (* Adds a license to the license file *)
2184 <  isc_action_svc_remove_license = 10; (* Removes a license from the license file *)
2185 <  isc_action_svc_db_stats       = 11; (* Retrieves database statistics *)
2186 <  isc_action_svc_get_ib_log     = 12; (* Retrieves the InterBase log file from the server *)
2187 <
2188 < (*****************************************)
2189 < (** Service information items           **)
2190 < (*****************************************)
2191 <
2192 <  isc_info_svc_svr_db_info      = 50; (* Retrieves the number of attachments and databases *)
2193 <  isc_info_svc_get_license      = 51; (* Retrieves all license keys and IDs from the license file *)
2194 <  isc_info_svc_get_license_mask = 52; (* Retrieves a bitmask representing licensed options on the server *)
2195 <  isc_info_svc_get_config       = 53; (* Retrieves the parameters and values for IB_CONFIG *)
2196 <  isc_info_svc_version          = 54; (* Retrieves the version of the services manager *)
2197 <  isc_info_svc_server_version   = 55;(* Retrieves the version of the InterBase server *)
2198 <  isc_info_svc_implementation   = 56; (* Retrieves the implementation of the InterBase server *)
2199 <  isc_info_svc_capabilities     = 57; (* Retrieves a bitmask representing the server's capabilities *)
2200 <  isc_info_svc_user_dbpath      = 58; (* Retrieves the path to the security database in use by the server *)
2201 <  isc_info_svc_get_env          = 59; (* Retrieves the setting of $INTERBASE *)
2202 <  isc_info_svc_get_env_lock     = 60; (* Retrieves the setting of $INTERBASE_LCK *)
2203 <  isc_info_svc_get_env_msg      = 61; (* Retrieves the setting of $INTERBASE_MSG *)
2204 <  isc_info_svc_line             = 62; (* Retrieves 1 line of service output per call *)
2205 <  isc_info_svc_to_eof           = 63; (* Retrieves as much of the server output as will fit in the supplied buffer *)
2206 <  isc_info_svc_timeout          = 64; (* Sets / signifies a timeout value for reading service information *)
2207 <  isc_info_svc_get_licensed_users = 65; (* Retrieves the number of users licensed for accessing the server *)
2208 <  isc_info_svc_limbo_trans      = 66; (* Retrieve the limbo transactions *)
2209 <  isc_info_svc_running          = 67; (* Checks to see if a service is running on an attachment *)
2210 <  isc_info_svc_get_users        = 68; (* Returns the user information from isc_action_svc_display_users *)
2211 <
2212 < (*****************************************)
2213 < (* Parameters for isc_action_{add|delete|modify)_user *)
2214 < (*****************************************)
2215 <
2216 <  isc_spb_sec_userid            = 5;
2217 <  isc_spb_sec_groupid           = 6;
2218 <  isc_spb_sec_username          = 7;
2219 <  isc_spb_sec_password          = 8;
2220 <  isc_spb_sec_groupname         = 9;
2221 <  isc_spb_sec_firstname         = 10;
2222 <  isc_spb_sec_middlename        = 11;
2223 <  isc_spb_sec_lastname          = 12;
2224 <
2225 < (*****************************************)
2226 < (* Parameters for isc_action_svc_(add|remove)_license, *)
2227 < (* isc_info_svc_get_license                            *)
2228 < (*****************************************)
2229 <
2230 <  isc_spb_lic_key               = 5;
2231 <  isc_spb_lic_id                = 6;
2232 <  isc_spb_lic_desc              = 7;
2233 <
2234 <
2235 < (*****************************************)
2236 < (* Parameters for isc_action_svc_backup  *)
2237 < (*****************************************)
2238 <
2239 <  isc_spb_bkp_file               = 5;
2240 <  isc_spb_bkp_factor             = 6;
2241 <  isc_spb_bkp_length             = 7;
2242 <  isc_spb_bkp_ignore_checksums   = $01;
2243 <  isc_spb_bkp_ignore_limbo       = $02;
2244 <  isc_spb_bkp_metadata_only      = $04;
2245 <  isc_spb_bkp_no_garbage_collect = $08;
2246 <  isc_spb_bkp_old_descriptions   = $10;
2247 <  isc_spb_bkp_non_transportable  = $20;
2248 <  isc_spb_bkp_convert            = $40;
2249 <  isc_spb_bkp_expand             = $80;
2250 <
2251 < (*****************************************)
2252 < (* Parameters for isc_action_svc_properties *)
2253 < (*****************************************)
2254 <
2255 <  isc_spb_prp_page_buffers            = 5;
2256 <  isc_spb_prp_sweep_interval          = 6;
2257 <  isc_spb_prp_shutdown_db             = 7;
2258 <  isc_spb_prp_deny_new_attachments    = 9;
2259 <  isc_spb_prp_deny_new_transactions   = 10;
2260 <  isc_spb_prp_reserve_space           = 11;
2261 <  isc_spb_prp_write_mode              = 12;
2262 <  isc_spb_prp_access_mode             = 13;
2263 <  isc_spb_prp_set_sql_dialect         = 14;
2264 <  isc_spb_prp_activate                = $0100;
2265 <  isc_spb_prp_db_online               = $0200;
2266 <
2267 < (*****************************************)
2268 < (* Parameters for isc_spb_prp_reserve_space *)
2269 < (*****************************************)
2270 <
2271 <  isc_spb_prp_res_use_full            = 35;
2272 <  isc_spb_prp_res                     = 36;
2273 <
2274 < (*****************************************)
2275 < (* Parameters for isc_spb_prp_write_mode  *)
2276 < (*****************************************)
2277 <
2278 <  isc_spb_prp_wm_async          = 37;
2279 <  isc_spb_prp_wm_sync           = 38;
2280 <
2281 < (*****************************************)
2282 < (* Parameters for isc_spb_prp_access_mode *)
2283 < (*****************************************)
2284 <
2285 <  isc_spb_prp_am_readonly       = 39;
2286 <  isc_spb_prp_am_readwrite      = 40;
2287 <
2288 < (*****************************************)
2289 < (* Parameters for isc_action_svc_repair  *)
2290 < (*****************************************)
2291 <
2292 <  isc_spb_rpr_commit_trans             = 15;
2293 <  isc_spb_rpr_rollback_trans           = 34;
2294 <  isc_spb_rpr_recover_two_phase        = 17;
2295 <  isc_spb_tra_id                       = 18;
2296 <  isc_spb_single_tra_id                = 19;
2297 <  isc_spb_multi_tra_id                 = 20;
2298 <  isc_spb_tra_state                    = 21;
2299 <  isc_spb_tra_state_limbo              = 22;
2300 <  isc_spb_tra_state_commit             = 23;
2301 <  isc_spb_tra_state_rollback           = 24;
2302 <  isc_spb_tra_state_unknown            = 25;
2303 <  isc_spb_tra_host_site                = 26;
2304 <  isc_spb_tra_remote_site              = 27;
2305 <  isc_spb_tra_db_path                  = 28;
2306 <  isc_spb_tra_advise                   = 29;
2307 <  isc_spb_tra_advise_commit            = 30;
2308 <  isc_spb_tra_advise_rollback          = 31;
2309 <  isc_spb_tra_advise_unknown           = 33;
2310 <  isc_spb_rpr_validate_db              = $01;
2311 <  isc_spb_rpr_sweep_db                 = $02;
2312 <  isc_spb_rpr_mend_db                  = $04;
2313 <  isc_spb_rpr_list_limbo_trans         = $08;
2314 <  isc_spb_rpr_check_db                 = $10;
2315 <  isc_spb_rpr_ignore_checksum          = $20;
2316 <  isc_spb_rpr_kill_shadows             = $40;
2317 <  isc_spb_rpr_full                     = $80;
2318 <
2319 < (*****************************************)
2320 < (* Parameters for isc_action_svc_restore  *)
2321 < (*****************************************)
2322 <
2323 <  isc_spb_res_buffers                  = 9;
2324 <  isc_spb_res_page_size                = 10;
2325 <  isc_spb_res_length                   = 11;
2326 <  isc_spb_res_access_mode              = 12;
2327 <  isc_spb_res_deactivate_idx           = $0100;
2328 <  isc_spb_res_no_shadow                = $0200;
2329 <  isc_spb_res_no_validity              = $0400;
2330 <  isc_spb_res_one_at_a_time            = $0800;
2331 <  isc_spb_res_replace                  = $1000;
2332 <  isc_spb_res_create                   = $2000;
2333 <  isc_spb_res_use_all_space            = $4000;
2334 <
2335 < (*****************************************)
2336 < (* Parameters for isc_spb_res_access_mode  *)
2337 < (*****************************************)
2338 <
2339 <  isc_spb_res_am_readonly               = isc_spb_prp_am_readonly;
2340 <  isc_spb_res_am_readwrite              = isc_spb_prp_am_readwrite;
2341 <
2342 < (*****************************************)
2343 < (* Parameters for isc_info_svc_svr_db_info *)
2344 < (*****************************************)
2345 <
2346 <  isc_spb_num_att               = 5;
2347 <  isc_spb_num_db                = 6;
2348 <
2349 < (*****************************************)
2350 < (* Parameters for isc_info_svc_db_stats  *)
2351 < (*****************************************)
2352 <
2353 <  isc_spb_sts_data_pages        = $01;
2354 <  isc_spb_sts_db_log            = $02;
2355 <  isc_spb_sts_hdr_pages         = $04;
2356 <  isc_spb_sts_idx_pages         = $08;
2357 <  isc_spb_sts_sys_relations     = $10;
2358 <
2359 <
2360 < (***************************)
2361 < (** SQL information items **)
2362 < (***************************)
2363 <
2364 <  isc_info_sql_select            =          4;
2365 <  isc_info_sql_bind              =          5;
2366 <  isc_info_sql_num_variables     =          6;
2367 <  isc_info_sql_describe_vars     =          7;
2368 <  isc_info_sql_describe_end      =          8;
2369 <  isc_info_sql_sqlda_seq         =          9;
2370 <  isc_info_sql_message_seq       =         10;
2371 <  isc_info_sql_type              =         11;
2372 <  isc_info_sql_sub_type          =         12;
2373 <  isc_info_sql_scale             =         13;
2374 <  isc_info_sql_length            =         14;
2375 <  isc_info_sql_null_ind          =         15;
2376 <  isc_info_sql_field             =         16;
2377 <  isc_info_sql_relation          =         17;
2378 <  isc_info_sql_owner             =         18;
2379 <  isc_info_sql_alias             =         19;
2380 <  isc_info_sql_sqlda_start       =         20;
2381 <  isc_info_sql_stmt_type         =         21;
2382 <  isc_info_sql_get_plan          =         22;
2383 <  isc_info_sql_records           =         23;
2384 <  isc_info_sql_batch_fetch       =         24;
2385 <
2386 < (***********************************)
2387 < (** SQL information return values **)
2388 < (***********************************)
2389 <
2390 <  isc_info_sql_stmt_select           =          1;
2391 <  isc_info_sql_stmt_insert           =          2;
2392 <  isc_info_sql_stmt_update           =          3;
2393 <  isc_info_sql_stmt_delete           =          4;
2394 <  isc_info_sql_stmt_ddl              =          5;
2395 <  isc_info_sql_stmt_get_segment      =          6;
2396 <  isc_info_sql_stmt_put_segment      =          7;
2397 <  isc_info_sql_stmt_exec_procedure   =          8;
2398 <  isc_info_sql_stmt_start_trans      =          9;
2399 <  isc_info_sql_stmt_commit           =         10;
2400 <  isc_info_sql_stmt_rollback         =         11;
2401 <  isc_info_sql_stmt_select_for_upd   =         12;
2402 <  isc_info_sql_stmt_set_generator    =         13;
2403 <
2404 <
2405 < (*************************************)
2406 < (** Server configuration key values **)
2407 < (*************************************)
2408 <
2409 <  ISCCFG_LOCKMEM_KEY             =          0;
2410 <  ISCCFG_LOCKSEM_KEY             =          1;
2411 <  ISCCFG_LOCKSIG_KEY             =          2;
2412 <  ISCCFG_EVNTMEM_KEY             =          3;
2413 <  ISCCFG_DBCACHE_KEY             =          4;
2414 <  ISCCFG_PRIORITY_KEY            =          5;
2415 <  ISCCFG_IPCMAP_KEY              =          6;
2416 <  ISCCFG_MEMMIN_KEY              =          7;
2417 <  ISCCFG_MEMMAX_KEY              =          8;
2418 <  ISCCFG_LOCKORDER_KEY           =          9;
2419 <  ISCCFG_ANYLOCKMEM_KEY          =         10;
2420 <  ISCCFG_ANYLOCKSEM_KEY          =         11;
2421 <  ISCCFG_ANYLOCKSIG_KEY          =         12;
2422 <  ISCCFG_ANYEVNTMEM_KEY          =         13;
2423 <  ISCCFG_LOCKHASH_KEY            =         14;
2424 <  ISCCFG_DEADLOCK_KEY            =         15;
2425 <  ISCCFG_LOCKSPIN_KEY            =         16;
2426 <  ISCCFG_CONN_TIMEOUT_KEY        =         17;
2427 <  ISCCFG_DUMMY_INTRVL_KEY        =         18;
2428 <
2429 <
2430 < (*****************)
2431 < (** Error codes **)
2432 < (*****************)
2433 <
2434 <  isc_facility                   =         20;
2435 <  isc_err_base                   =  335544320;
2436 <  isc_err_factor                 =          1;
2437 <  isc_arg_end                    =          0;
2438 <  isc_arg_gds                    =          1;
2439 <  isc_arg_string                 =          2;
2440 <  isc_arg_cstring                =          3;
2441 <  isc_arg_number                 =          4;
2442 <  isc_arg_interpreted            =          5;
2443 <  isc_arg_vms                    =          6;
2444 <  isc_arg_unix                   =          7;
2445 <  isc_arg_domain                 =          8;
2446 <  isc_arg_dos                    =          9;
2447 <  isc_arg_mpexl                  =         10;
2448 <  isc_arg_mpexl_ipc              =         11;
2449 <  isc_arg_next_mach              =         15;
2450 <  isc_arg_netware                =         16;
2451 <  isc_arg_win32                  =         17;
2452 <  isc_arg_warning                =         18;
2453 <
2454 < (************************************************)
2455 < (** Dynamic Data Definition Language operators **)
2456 < (************************************************)
2457 <
2458 < (********************)
2459 < (** Version number **)
2460 < (********************)
2461 <
2462 <  isc_dyn_version_1              =          1;
2463 <  isc_dyn_eoc                    =         -1;
2464 <
2465 < (********************************)
2466 < (** Operations (may be nested) **)
2467 < (********************************)
2468 <
2469 <  isc_dyn_begin                  =          2;
2470 <  isc_dyn_end                    =          3;
2471 <  isc_dyn_if                     =          4;
2472 <  isc_dyn_def_database           =          5;
2473 <  isc_dyn_def_global_fld         =          6;
2474 <  isc_dyn_def_local_fld          =          7;
2475 <  isc_dyn_def_idx                =          8;
2476 <  isc_dyn_def_rel                =          9;
2477 <  isc_dyn_def_sql_fld            =         10;
2478 <  isc_dyn_def_view               =         12;
2479 <  isc_dyn_def_trigger            =         15;
2480 <  isc_dyn_def_security_class     =        120;
2481 <  isc_dyn_def_dimension          =        140;
2482 <  isc_dyn_def_generator          =         24;
2483 <  isc_dyn_def_function           =         25;
2484 <  isc_dyn_def_filter             =         26;
2485 <  isc_dyn_def_function_arg       =         27;
2486 <  isc_dyn_def_shadow             =         34;
2487 <  isc_dyn_def_trigger_msg        =         17;
2488 <  isc_dyn_def_file               =         36;
2489 <  isc_dyn_mod_database           =         39;
2490 <  isc_dyn_mod_rel                =         11;
2491 <  isc_dyn_mod_global_fld         =         13;
2492 <  isc_dyn_mod_idx                =        102;
2493 <  isc_dyn_mod_local_fld          =         14;
2494 <  isc_dyn_mod_sql_fld          =          216;
2495 <  isc_dyn_mod_view               =         16;
2496 <  isc_dyn_mod_security_class     =        122;
2497 <  isc_dyn_mod_trigger            =        113;
2498 <  isc_dyn_mod_trigger_msg        =         28;
2499 <  isc_dyn_delete_database        =         18;
2500 <  isc_dyn_delete_rel             =         19;
2501 <  isc_dyn_delete_global_fld      =         20;
2502 <  isc_dyn_delete_local_fld       =         21;
2503 <  isc_dyn_delete_idx             =         22;
2504 <  isc_dyn_delete_security_class  =        123;
2505 <  isc_dyn_delete_dimensions      =        143;
2506 <  isc_dyn_delete_trigger         =         23;
2507 <  isc_dyn_delete_trigger_msg     =         29;
2508 <  isc_dyn_delete_filter          =         32;
2509 <  isc_dyn_delete_function        =         33;
2510 <  isc_dyn_delete_shadow          =         35;
2511 <  isc_dyn_grant                  =         30;
2512 <  isc_dyn_revoke                 =         31;
2513 <  isc_dyn_def_primary_key        =         37;
2514 <  isc_dyn_def_foreign_key        =         38;
2515 <  isc_dyn_def_unique             =         40;
2516 <  isc_dyn_def_procedure          =        164;
2517 <  isc_dyn_delete_procedure       =        165;
2518 <  isc_dyn_def_parameter          =        135;
2519 <  isc_dyn_delete_parameter       =        136;
2520 <  isc_dyn_mod_procedure          =        175;
2521 <  isc_dyn_def_log_file           =        176;
2522 <  isc_dyn_def_cache_file         =        180;
2523 <  isc_dyn_def_exception          =        181;
2524 <  isc_dyn_mod_exception          =        182;
2525 <  isc_dyn_del_exception          =        183;
2526 <  isc_dyn_drop_log               =        194;
2527 <  isc_dyn_drop_cache             =        195;
2528 <  isc_dyn_def_default_log        =        202;
2529 <
2530 < (*************************)
2531 < (** View specific stuff **)
2532 < (*************************)
2533 <
2534 <  isc_dyn_view_blr               =         43;
2535 <  isc_dyn_view_source            =         44;
2536 <  isc_dyn_view_relation          =         45;
2537 <  isc_dyn_view_context           =         46;
2538 <  isc_dyn_view_context_name      =         47;
2539 <
2540 < (************************)
2541 < (** Generic attributes **)
2542 < (************************)
2543 <
2544 <  isc_dyn_rel_name               =         50;
2545 <  isc_dyn_fld_name               =         51;
2546 <  isc_dyn_new_fld_name           =        215;
2547 <  isc_dyn_idx_name               =         52;
2548 <  isc_dyn_description            =         53;
2549 <  isc_dyn_security_class         =         54;
2550 <  isc_dyn_system_flag            =         55;
2551 <  isc_dyn_update_flag            =         56;
2552 <  isc_dyn_prc_name               =        166;
2553 <  isc_dyn_prm_name               =        137;
2554 <  isc_dyn_sql_object             =        196;
2555 <  isc_dyn_fld_character_set_name =        174;
2556 <
2557 < (**********************************)
2558 < (** Relation specific attributes **)
2559 < (**********************************)
2560 <
2561 <  isc_dyn_rel_dbkey_length       =         61;
2562 <  isc_dyn_rel_store_trig         =         62;
2563 <  isc_dyn_rel_modify_trig        =         63;
2564 <  isc_dyn_rel_erase_trig         =         64;
2565 <  isc_dyn_rel_store_trig_source  =         65;
2566 <  isc_dyn_rel_modify_trig_source =         66;
2567 <  isc_dyn_rel_erase_trig_source  =         67;
2568 <  isc_dyn_rel_ext_file           =         68;
2569 <  isc_dyn_rel_sql_protection     =         69;
2570 <  isc_dyn_rel_constraint         =        162;
2571 <  isc_dyn_delete_rel_constraint  =        163;
2572 <
2573 < (**************************************)
2574 < (** Global field specific attributes **)
2575 < (**************************************)
2576 <
2577 <  isc_dyn_fld_type               =         70;
2578 <  isc_dyn_fld_length             =         71;
2579 <  isc_dyn_fld_scale              =         72;
2580 <  isc_dyn_fld_sub_type           =         73;
2581 <  isc_dyn_fld_segment_length     =         74;
2582 <  isc_dyn_fld_query_header       =         75;
2583 <  isc_dyn_fld_edit_string        =         76;
2584 <  isc_dyn_fld_validation_blr     =         77;
2585 <  isc_dyn_fld_validation_source  =         78;
2586 <  isc_dyn_fld_computed_blr       =         79;
2587 <  isc_dyn_fld_computed_source    =         80;
2588 <  isc_dyn_fld_missing_value      =         81;
2589 <  isc_dyn_fld_default_value      =         82;
2590 <  isc_dyn_fld_query_name         =         83;
2591 <  isc_dyn_fld_dimensions         =         84;
2592 <  isc_dyn_fld_not_null           =         85;
2593 <  isc_dyn_fld_precision          =         86;
2594 <  isc_dyn_fld_char_length        =        172;
2595 <  isc_dyn_fld_collation          =        173;
2596 <  isc_dyn_fld_default_source     =        193;
2597 <  isc_dyn_del_default            =        197;
2598 <  isc_dyn_del_validation         =        198;
2599 <  isc_dyn_single_validation      =        199;
2600 <  isc_dyn_fld_character_set      =        203;
2601 <
2602 < (*************************************)
2603 < (** Local field specific attributes **)
2604 < (*************************************)
2605 <
2606 <  isc_dyn_fld_source             =         90;
2607 <  isc_dyn_fld_base_fld           =         91;
2608 <  isc_dyn_fld_position           =         92;
2609 <  isc_dyn_fld_update_flag        =         93;
2610 <
2611 < (*******************************)
2612 < (** Index specific attributes **)
2613 < (*******************************)
2614 <
2615 <  isc_dyn_idx_unique             =        100;
2616 <  isc_dyn_idx_inactive           =        101;
2617 <  isc_dyn_idx_type               =        103;
2618 <  isc_dyn_idx_foreign_key        =        104;
2619 <  isc_dyn_idx_ref_column         =        105;
2620 <  isc_dyn_idx_statistic          =        204;
2621 <
2622 < (*********************************)
2623 < (** Trigger specific attributes **)
2624 < (*********************************)
2625 <
2626 <  isc_dyn_trg_type               =        110;
2627 <  isc_dyn_trg_blr                =        111;
2628 <  isc_dyn_trg_source             =        112;
2629 <  isc_dyn_trg_name               =        114;
2630 <  isc_dyn_trg_sequence           =        115;
2631 <  isc_dyn_trg_inactive           =        116;
2632 <  isc_dyn_trg_msg_number         =        117;
2633 <  isc_dyn_trg_msg                =        118;
2634 <
2635 < (****************************************)
2636 < (** Security Class specific attributes **)
2637 < (****************************************)
2638 <
2639 <  isc_dyn_scl_acl                =        121;
2640 <  isc_dyn_grant_user             =        130;
2641 <  isc_dyn_grant_proc             =        186;
2642 <  isc_dyn_grant_trig             =        187;
2643 <  isc_dyn_grant_view             =        188;
2644 <  isc_dyn_grant_options          =        132;
2645 <  isc_dyn_grant_user_group       =        205;
2646 <
2647 < (************************************)
2648 < (** Dimension specific information **)
2649 < (************************************)
2650 <
2651 <  isc_dyn_dim_lower              =        141;
2652 <  isc_dyn_dim_upper              =        142;
2653 <
2654 < (******************************)
2655 < (** File specific attributes **)
2656 < (******************************)
2657 <
2658 <  isc_dyn_file_name              =        125;
2659 <  isc_dyn_file_start             =        126;
2660 <  isc_dyn_file_length            =        127;
2661 <  isc_dyn_shadow_number          =        128;
2662 <  isc_dyn_shadow_man_auto        =        129;
2663 <  isc_dyn_shadow_conditional     =        130;
2664 <
2665 < (**********************************)
2666 < (** Log file specific attributes **)
2667 < (**********************************)
2668 <
2669 <  isc_dyn_log_file_sequence      =        177;
2670 <  isc_dyn_log_file_partitions    =        178;
2671 <  isc_dyn_log_file_serial        =        179;
2672 <  isc_dyn_log_file_overflow      =        200;
2673 <  isc_dyn_log_file_raw           =        201;
2674 <
2675 < (*****************************)
2676 < (** Log specific attributes **)
2677 < (*****************************)
2678 <
2679 <  isc_dyn_log_group_commit_wait  =        189;
2680 <  isc_dyn_log_buffer_size        =        190;
2681 <  isc_dyn_log_check_point_length =        191;
2682 <  isc_dyn_log_num_of_buffers     =        192;
2683 <
2684 < (**********************************)
2685 < (** Function specific attributes **)
2686 < (**********************************)
2687 <
2688 <  isc_dyn_function_name          =        145;
2689 <  isc_dyn_function_type          =        146;
2690 <  isc_dyn_func_module_name       =        147;
2691 <  isc_dyn_func_entry_point       =        148;
2692 <  isc_dyn_func_return_argument   =        149;
2693 <  isc_dyn_func_arg_position      =        150;
2694 <  isc_dyn_func_mechanism         =        151;
2695 <  isc_dyn_filter_in_subtype      =        152;
2696 <  isc_dyn_filter_out_subtype     =        153;
2697 <
2698 <
2699 <  isc_dyn_description2           =        154;
2700 <  isc_dyn_fld_computed_source2   =        155;
2701 <  isc_dyn_fld_edit_string2       =        156;
2702 <  isc_dyn_fld_query_header2      =        157;
2703 <  isc_dyn_fld_validation_source2 =        158;
2704 <  isc_dyn_trg_msg2               =        159;
2705 <  isc_dyn_trg_source2            =        160;
2706 <  isc_dyn_view_source2           =        161;
2707 <  isc_dyn_xcp_msg2               =        184;
2708 <
2709 < (***********************************)
2710 < (** Generator specific attributes **)
2711 < (***********************************)
2712 <
2713 <  isc_dyn_generator_name         =         95;
2714 <  isc_dyn_generator_id           =         96;
2715 <
2716 < (***********************************)
2717 < (** Procedure specific attributes **)
2718 < (***********************************)
2719 <
2720 <  isc_dyn_prc_inputs             =        167;
2721 <  isc_dyn_prc_outputs            =        168;
2722 <  isc_dyn_prc_source             =        169;
2723 <  isc_dyn_prc_blr                =        170;
2724 <  isc_dyn_prc_source2            =        171;
2725 <
2726 < (***********************************)
2727 < (** Parameter specific attributes **)
2728 < (***********************************)
2729 <
2730 <  isc_dyn_prm_number             =        138;
2731 <  isc_dyn_prm_type               =        139;
2732 <
2733 < (**********************************)
2734 < (** Relation specific attributes **)
2735 < (**********************************)
2736 <
2737 <  isc_dyn_xcp_msg                =        185;
2738 <
2739 < (************************************************)
2740 < (** Cascading referential integrity values     **)
2741 < (************************************************)
2742 <  isc_dyn_foreign_key_update     =        205;
2743 <  isc_dyn_foreign_key_delete     =        206;
2744 <  isc_dyn_foreign_key_cascade    =        207;
2745 <  isc_dyn_foreign_key_default    =        208;
2746 <  isc_dyn_foreign_key_null       =        209;
2747 <  isc_dyn_foreign_key_none       =        210;
2748 <
2749 < (*************************)
2750 < (** SQL role values     **)
2751 < (*************************)
2752 <  isc_dyn_def_sql_role           =        211;
2753 <  isc_dyn_sql_role_name          =        212;
2754 <  isc_dyn_grant_admin_options    =        213;
2755 <  isc_dyn_del_sql_role           =        214;
2756 <
2757 < (******************************)
2758 < (** Last $dyn value assigned **)
2759 < (******************************)
2760 <
2761 <  isc_dyn_last_dyn_value         =        216;
2762 <
2763 < (********************************************)
2764 < (** Array slice description language (SDL) **)
2765 < (********************************************)
2766 <
2767 <  isc_sdl_version1               =          1;
2768 <  isc_sdl_eoc                    =         -1;
2769 <  isc_sdl_relation               =          2;
2770 <  isc_sdl_rid                    =          3;
2771 <  isc_sdl_field                  =          4;
2772 <  isc_sdl_fid                    =          5;
2773 <  isc_sdl_struct                 =          6;
2774 <  isc_sdl_variable               =          7;
2775 <  isc_sdl_scalar                 =          8;
2776 <  isc_sdl_tiny_integer           =          9;
2777 <  isc_sdl_short_integer          =         10;
2778 <  isc_sdl_long_integer           =         11;
2779 <  isc_sdl_literal                =         12;
2780 <  isc_sdl_add                    =         13;
2781 <  isc_sdl_subtract               =         14;
2782 <  isc_sdl_multiply               =         15;
2783 <  isc_sdl_divide                 =         16;
2784 <  isc_sdl_negate                 =         17;
2785 <  isc_sdl_eql                    =         18;
2786 <  isc_sdl_neq                    =         19;
2787 <  isc_sdl_gtr                    =         20;
2788 <  isc_sdl_geq                    =         21;
2789 <  isc_sdl_lss                    =         22;
2790 <  isc_sdl_leq                    =         23;
2791 <  isc_sdl_and                    =         24;
2792 <  isc_sdl_or                     =         25;
2793 <  isc_sdl_not                    =         26;
2794 <  isc_sdl_while                  =         27;
2795 <  isc_sdl_assignment             =         28;
2796 <  isc_sdl_label                  =         29;
2797 <  isc_sdl_leave                  =         30;
2798 <  isc_sdl_begin                  =         31;
2799 <  isc_sdl_end                    =         32;
2800 <  isc_sdl_do3                    =         33;
2801 <  isc_sdl_do2                    =         34;
2802 <  isc_sdl_do1                    =         35;
2803 <  isc_sdl_element                =         36;
2804 <
2805 < (**********************************************)
2806 < (** International text interpretation values **)
2807 < (**********************************************)
2808 <
2809 <  isc_interp_eng_ascii           =          0;
2810 <  isc_interp_jpn_sjis            =          5;
2811 <  isc_interp_jpn_euc             =          6;
2812 <
2813 < (******************************************)
2814 < (** Scroll direction for isc_dsql_fetch2 **)
2815 < (******************************************)
2816 <
2817 <  isc_fetch_next                 =          0;
2818 <  isc_fetch_prior                =          1;
2819 <  isc_fetch_first                =          2;
2820 <  isc_fetch_last                 =          3;
2821 <  isc_fetch_absolute             =          4;
2822 <  isc_fetch_relative             =          5;
2823 <
2824 < (*********************)
2825 < (** SQL definitions **)
2826 < (*********************)
2827 <  SQL_VARYING                    =        448;
2828 <  SQL_TEXT                       =        452;
2829 <  SQL_DOUBLE                     =        480;
2830 <  SQL_FLOAT                      =        482;
2831 <  SQL_LONG                       =        496;
2832 <  SQL_SHORT                      =        500;
2833 <  SQL_TIMESTAMP                  =        510;
2834 <  SQL_BLOB                       =        520;
2835 <  SQL_D_FLOAT                    =        530;
2836 <  SQL_ARRAY                      =        540;
2837 <  SQL_QUAD                       =        550;
2838 <  SQL_TYPE_TIME                  =        560;
2839 <  SQL_TYPE_DATE                  =        570;
2840 <  SQL_INT64                      =        580;
2841 <  SQL_DATE                       =        SQL_TIMESTAMP;
2842 <
2843 < (*******************)
2844 < (** Blob Subtypes **)
2845 < (*******************)
2846 <
2847 < (** types less than zero are reserved for customer use **)
2848 <
2849 <  isc_blob_untyped               =          0;
2850 <
2851 < (** internal subtypes **)
2852 <
2853 <  isc_blob_text                  =          1;
2854 <  isc_blob_blr                   =          2;
2855 <  isc_blob_acl                   =          3;
2856 <  isc_blob_ranges                =          4;
2857 <  isc_blob_summary               =          5;
2858 <  isc_blob_format                =          6;
2859 <  isc_blob_tra                   =          7;
2860 <  isc_blob_extfile               =          8;
2861 <
2862 < (** the range 20-30 is reserved for dBASE and Paradox types **)
2863 <
2864 <  isc_blob_formatted_memo        =         20;
2865 <  isc_blob_paradox_ole           =         21;
2866 <  isc_blob_graphic               =         22;
2867 <  isc_blob_dbase_ole             =         23;
2868 <  isc_blob_typed_binary          =         24;
2869 <
2870 < {$IFDEF IB5_ONLY}
2871 < (** SQLDA_LENGTH is defined in C as a macro, but in Pascal we must defined it
2872 <   as a function... **)
2873 < function SQLDA_LENGTH(n: Long): Long;
2874 < {$ENDIF}
2875 <
2876 < (** XSQLDA_LENGTH is defined in C as a macro, but in Pascal we must defined it
2877 <   as a function... **)
2878 < function XSQLDA_LENGTH(n: Long): Long;
2879 <
2880 < (** getb, putb, putbx are all defined in C as macros.
2881 <   Use functions and procedures for the functionality **)
2882 < function getb                   (p: PBSTREAM): Char;
2883 < function putb                   (x: Char; p: PBSTREAM): Int;
2884 < function putbx                  (x: Char; p: PBSTREAM): Int;
2885 <
2886 < (*
2887 < #define ADD_SPB_LENGTH(p, length)       {*(p)++ = (length); \
2888 <                                         *(p)++ = (length) >> 8;}
2889 <
2890 < #define ADD_SPB_NUMERIC(p, data)        {*(p)++ = (data); \
2891 <                                         *(p)++ = (data) >> 8; \
2892 <                                         *(p)++ = (data) >> 16; \
2893 <                                         *(p)++ = (data) >> 24;}
2894 < *)
2895 < procedure add_spb_length(var p: PChar; length: integer);
2896 < procedure add_spb_numeric(var p: PChar; data: integer);
2897 <
2898 <
2899 < implementation
2900 <
2901 < uses IBIntf, IB;
2902 <
2903 < {$IFDEF IB5_ONLY}
2904 < function SQLDA_LENGTH(n: Long): Long;
2905 < (*  The C-macro reads like this:
2906 <   SQLDA_LENGTH(n)         (sizeof (SQLDA) + (n-1) * sizeof (SQLVAR)) *)
2907 < begin
2908 <  result := sizeof(TSQLDA) + ((n - 1) * sizeof(TSQLVAR));
2909 < end;
2910 < {$ENDIF}
2911 <
2912 <
2913 < function XSQLDA_LENGTH(n: Long): Long;
2914 < (*  The C-macro reads like this:
2915 <   XSQLDA_LENGTH(n)     (sizeof (XSQLDA) + (n-1) * sizeof (XSQLVAR)) *)
2916 < begin
2917 <  result := SizeOf(TXSQLDA) + ((n - 1) * SizeOf(TXSQLVAR));
2918 < end;
2919 <
2920 < function getb(p: PBSTREAM): Char;
2921 < (*  The C-macro reads like this:
2922 <   getb(p)      (--(p)->bstr_cnt >= 0 ? *(p)->bstr_ptr++ & 0377: BLOB_get (p)) *)
2923 < begin
2924 <  Dec(p^.bstr_cnt);
2925 <  if (p^.bstr_cnt >= 0) then begin
2926 <    result := Char(Int(p^.bstr_ptr^) and Int(0377));
2927 <    Inc(p^.bstr_ptr);
2928 <  end else
2929 <    result := Char(BLOB_get(p));
2930 < end;
2931 <
2932 < function putb(x: Char; p: PBSTREAM): Int;
2933 < (*  The C-macro reads like this:
2934 <   putb(x,p) ((x == '\n' || (!(--(p)->bstr_cnt))) ?      // then
2935 <     BLOB_put (x,p) :                                    // else
2936 <     ((int) (*(p)->bstr_ptr++ = (unsigned) (x)))) *)
2937 < begin
2938 <  Dec(p^.bstr_cnt);
2939 <  if (x = Chr(Int('n') - Int('a'))) or (p^.bstr_cnt = 0) then
2940 <    result := BLOB_put(x, p)
2941 <  else begin
2942 <    p^.bstr_ptr^ := Char(x);
2943 <    result := UInt(x);
2944 <    Inc(p^.bstr_ptr^);
2945 <  end;
2946 < end;
2947 <
2948 < function putbx(x: Char; p: PBSTREAM): Int;
2949 < (*  The C-macro reads like this:
2950 <   putbx(x,p) ((!(--(p)->bstr_cnt)) ?    // then
2951 <     BLOB_put (x,p) :                    // else
2952 <     ((int) (*(p)->bstr_ptr++ = (unsigned) (x)))) *)
2953 < begin
2954 <  Dec(p^.bstr_cnt);
2955 <  if (p^.bstr_cnt = 0) then
2956 <    result := BLOB_put(x, p)
2957 <  else begin
2958 <    p^.bstr_ptr^ := Char(x);
2959 <    Inc(p^.bstr_ptr^);
2960 <    result := UInt(x);
2961 <  end;
2962 < end;
2963 <
2964 < (*******************************************)
2965 < (** Service manager functions             **)
2966 < (*******************************************)
2967 <
2968 <
2969 < procedure add_spb_length(var p: PChar; length: integer);
2970 < (*
2971 < #define ADD_SPB_LENGTH(p, length)       {*(p)++ = (length); \
2972 <                                         *(p)++ = (length) >> 8;}
2973 < *)
2974 < begin
2975 <  p^ := char(length);
2976 <  Inc (p);
2977 <  p^ := char(length shr 8);
2978 <  Inc (p);
2979 < end;
2980 <
2981 < procedure add_spb_numeric(var p: PChar; data: integer);
2982 < (*
2983 < #define ADD_SPB_NUMERIC(p, data)        {*(p)++ = (data); \
2984 <                                         *(p)++ = (data) >> 8; \
2985 <                                         *(p)++ = (data) >> 16; \
2986 <                                         *(p)++ = (data) >> 24;}
2987 < *)
2988 < begin
2989 <  p^ := char(data);
2990 <  Inc (p);
2991 <  p^ := char(data shr 8);
2992 <  Inc (p);
2993 <  p^ := char(data shr 16);
2994 <  Inc (p);
2995 <  p^ := char(data shr 24);
2996 <  Inc (p);
2997 < end;
2998 <
2999 < end.
3000 <
1 > {************************************************************************}
2 > {                                                                        }
3 > {       Borland Delphi Visual Component Library                          }
4 > {       InterBase Express core components                                }
5 > {                                                                        }
6 > {       Copyright (c) 1998-2000 Inprise Corporation                      }
7 > {                                                                        }
8 > {    InterBase Express is based in part on the product                   }
9 > {    Free IB Components, written by Gregory H. Deatz for                 }
10 > {    Hoagland, Longo, Moran, Dunst & Doukas Company.                     }
11 > {    Free IB Components is used under license.                           }
12 > {                                                                        }
13 > {    The contents of this file are subject to the InterBase              }
14 > {    Public License Version 1.0 (the "License"); you may not             }
15 > {    use this file except in compliance with the License. You            }
16 > {    may obtain a copy of the License at http://www.Inprise.com/IPL.html }
17 > {    Software distributed under the License is distributed on            }
18 > {    an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either              }
19 > {    express or implied. See the License for the specific language       }
20 > {    governing rights and limitations under the License.                 }
21 > {    The Original Code was created by InterBase Software Corporation     }
22 > {       and its successors.                                              }
23 > {    Portions created by Inprise Corporation are Copyright (C) Inprise   }
24 > {       Corporation. All Rights Reserved.                                }
25 > {    Contributor(s): Jeff Overcash                                       }
26 > {                                                                        }
27 > {    IBX For Lazarus (Firebird Express)                                  }
28 > {    Contributor: Tony Whyman, MWA Software http://www.mwasoftware.co.uk }
29 > {    Portions created by MWA Software are copyright McCallum Whyman      }
30 > {    Associates Ltd 2011                                                 }
31 > {                                                                        }
32 > {************************************************************************}
33 >
34 > unit IBHeader;
35 >
36 > {$Mode Delphi}
37 >
38 > interface
39 >
40 > uses
41 >  IBExternals;
42 >
43 >
44 > const
45 >  ISC_TRUE = 1;
46 >  ISC_FALSE = 0;
47 >  DSQL_close = 1;
48 >  DSQL_drop = 2;
49 >  {$IFDEF LINUX}
50 >  FIREBIRD_SO2 = 'libfbclient.so.2';
51 >  {$ENDIF}
52 >  {$IFDEF DARWIN}
53 >  FIREBIRD_SO2 = 'libfbclient.dylib';
54 >  {$ENDIF}
55 >  {$IFDEF WINDOWS}
56 >  IBASE_DLL = 'gds32.dll';
57 >  FIREBIRD_CLIENT = 'fbclient.dll'; {do not localize}
58 >  FIREBIRD_EMBEDDED = 'fbembed.dll';
59 >  {$ENDIF}
60 >
61 > const
62 >  SQLDA_VERSION1               = 1; (* pre V6.0 SQLDA *)
63 >  SQLDA_VERSION2               = 2; (*     V6.0 SQLDA *)
64 >  SQL_DIALECT_V5               = 1; (* meaning is same as DIALECT_xsqlda *)
65 >  SQL_DIALECT_V6_TRANSITION    = 2; (* flagging anything that is delimited
66 >                                       by double quotes as an error and
67 >                                       flagging keyword DATE as an error *)
68 >  SQL_DIALECT_V6               = 3; (* supports SQL delimited identifier,
69 >                                       SQLDATE/DATE, TIME, TIMESTAMP,
70 >                                       CURRENT_DATE, CURRENT_TIME,
71 >                                       CURRENT_TIMESTAMP, and 64-bit exact
72 >                                       numeric type *)
73 >  SQL_DIALECT_CURRENT          = SQL_DIALECT_V6; (* latest IB DIALECT *)
74 >
75 >
76 > type
77 >  (**********************************)
78 >  (** InterBase Handle Definitions **)
79 >  (**********************************)
80 >  TISC_ATT_HANDLE               = FB_API_HANDLE;
81 >  PISC_ATT_HANDLE               = ^TISC_ATT_HANDLE;
82 >  TISC_BLOB_HANDLE              = FB_API_HANDLE;
83 >  PISC_BLOB_HANDLE              = ^TISC_BLOB_HANDLE;
84 >  TISC_DB_HANDLE                = FB_API_HANDLE;
85 >  PISC_DB_HANDLE                = ^TISC_DB_HANDLE;
86 >  TISC_FORM_HANDLE              = FB_API_HANDLE;
87 >  PISC_FORM_HANDLE              = ^TISC_FORM_HANDLE;
88 >  TISC_REQ_HANDLE               = FB_API_HANDLE;
89 >  PISC_REQ_HANDLE               = ^TISC_REQ_HANDLE;
90 >  TISC_STMT_HANDLE              = FB_API_HANDLE;
91 >  PISC_STMT_HANDLE              = ^TISC_STMT_HANDLE;
92 >  TISC_SVC_HANDLE               = FB_API_HANDLE;
93 >  PISC_SVC_HANDLE               = ^TISC_SVC_HANDLE;
94 >  TISC_TR_HANDLE                = FB_API_HANDLE;
95 >  PISC_TR_HANDLE                = ^TISC_TR_HANDLE;
96 >  TISC_WIN_HANDLE               = FB_API_HANDLE;
97 >  PISC_WIN_HANDLE               = ^TISC_WIN_HANDLE;
98 >  TISC_CALLBACK                 = procedure;
99 >  ISC_SVC_HANDLE               = ISC_LONG;
100 >
101 >  (*******************************************************************)
102 >  (* Time & Date Support                                             *)
103 >  (*******************************************************************)
104 > const
105 >  TIME_SECONDS_PRECISION       = 10000;
106 >  TIME_SECONDS_PRECISION_SCALE = -4;
107 >
108 > type
109 >  ISC_DATE = Long;
110 >  PISC_DATE = ^ISC_DATE;
111 >  ISC_TIME = ULong;
112 >  PISC_TIME = ^ISC_TIME;
113 >  TISC_TIMESTAMP = record
114 >    timestamp_date: ISC_DATE;
115 >    timestamp_time: ISC_TIME;
116 >  end;
117 >  PISC_TIMESTAMP = ^TISC_TIMESTAMP;
118 >
119 >  (*********************************************************************)
120 >  (** Blob id structure                                               **)
121 >  (*********************************************************************)
122 >  TGDS_QUAD = record
123 >    gds_quad_high      : ISC_LONG;
124 >    gds_quad_low       : UISC_LONG;
125 >  end;
126 >  TGDS__QUAD           = TGDS_QUAD;
127 >  TISC_QUAD            = TGDS_QUAD;
128 >  PGDS_QUAD            = ^TGDS_QUAD;
129 >  PGDS__QUAD           = ^TGDS__QUAD;
130 >  PISC_QUAD            = ^TISC_QUAD;
131 >
132 >  TISC_ARRAY_BOUND = record
133 >    array_bound_lower  : short;
134 >    array_bound_upper  : short;
135 >  end;
136 >  PISC_ARRAY_BOUND     = ^TISC_ARRAY_BOUND;
137 >  TISC_ARRAY_DESC = record
138 >    array_desc_dtype            : UChar;
139 >    array_desc_scale            : Char;
140 >    array_desc_length           : UShort;
141 >    array_desc_field_name       : array[0..31] of Char;
142 >    array_desc_relation_name    : array[0..31] of Char;
143 >    array_desc_dimensions       : Short;
144 >    array_desc_flags            : Short;
145 >    array_desc_bounds           : array[0..15] of TISC_ARRAY_BOUND;
146 >  end; // TISC_ARRAY_DESC
147 >  PISC_ARRAY_DESC = ^TISC_ARRAY_DESC;
148 >
149 >  TISC_BLOB_DESC = record
150 >    blob_desc_subtype           : Short;
151 >    blob_desc_charset           : Short;
152 >    blob_desc_segment_size      : Short;
153 >    blob_desc_field_name        : array[0..31] of UChar;
154 >    blob_desc_relation_name     : array[0..31] of UChar;
155 >  end; // TISC_BLOB_DESC
156 >  PISC_BLOB_DESC = ^TISC_BLOB_DESC;
157 >
158 >  (*****************************)
159 >  (** Blob control structure  **)
160 >  (*****************************)
161 >  TISC_BLOB_CTL_SOURCE_FUNCTION = function: ISC_STATUS; // ISC_FAR
162 >  PISC_BLOB_CTL                 = ^TISC_BLOB_CTL;        // ISC_FAR
163 >  TISC_BLOB_CTL = record
164 >    (** Source filter **)
165 >    ctl_source                  : TISC_BLOB_CTL_SOURCE_FUNCTION;
166 >    (** Argument to pass to source filter **)
167 >    ctl_source_handle           : PISC_BLOB_CTL;
168 >    ctl_to_sub_type             : Short;        (** Target type **)
169 >    ctl_from_sub_type           : Short;        (** Source type **)
170 >    ctl_buffer_length           : UShort;       (** Length of buffer **)
171 >    ctl_segment_length          : UShort;       (** Length of current segment **)
172 >    ctl_bpb_length              : UShort;       (** Length of blob parameter **)
173 >                                                (** block **)
174 >    ctl_bpb                     : PChar;        (** Address of blob parameter **)
175 >                                                (** block **)
176 >    ctl_buffer                  : PUChar;       (** Address of segment buffer **)
177 >    ctl_max_segment             : ISC_LONG;     (** Length of longest segment **)
178 >    ctl_number_segments         : ISC_LONG;     (** Total number of segments **)
179 >    ctl_total_length            : ISC_LONG;     (** Total length of blob **)
180 >    ctl_status                  : PISC_STATUS;  (** Address of status vector **)
181 >    ctl_data                    : array[0..7] of long; (** Application specific data **)
182 >  end;
183 >  (*****************************)
184 >  (** Blob stream definitions **)
185 >  (*****************************)
186 >  TBSTREAM = record
187 >    bstr_blob                   : PVoid;        (** Blob handle **)
188 >    bstr_buffer                 : PChar;        (** Address of buffer **)
189 >    bstr_ptr                    : PChar;        (** Next character **)
190 >    bstr_length                 : Short;        (** Length of buffer **)
191 >    bstr_cnt                    : Short;        (** Characters in buffer **)
192 >    bstr_mode                   : Char;         (** (mode) ? OUTPUT : INPUT **)
193 >  end;
194 >  PBSTREAM                      = ^TBSTREAM;
195 >
196 >  (*****************************)
197 >  (** Dynamic SQL definitions **)
198 >  (*****************************)
199 > {$IFDEF IB5_ONLY}
200 >  TSQLVAR = record
201 >    sqltype                     : Short;
202 >    sqllen                      : Short;
203 >    sqldata                     : PChar;
204 >    sqlind                      : PShort;
205 >    sqlname_length              : Short;
206 >    sqlname                     : array[0..29] of Char;
207 >  end;
208 >  PSQLVAR                       = ^TSQLVAR;
209 >
210 >  TSQLDA = record
211 >    sqldaid                     : array[0..7] of Char;
212 >    sqldabc                     : ISC_LONG;
213 >    sqln                        : Short;
214 >    sqld                        : Short;
215 >    sqlvar                      : array[0..0] of TSQLVAR;
216 >  end;
217 >  PSQLDA                         = ^TSQLDA;
218 > {$ENDIF}
219 >
220 >  (********************************)
221 >  (** Declare the extended SQLDA **)
222 >  (********************************)
223 >  TXSQLVAR = record
224 >    sqltype                     : Short;     (** datatype of field **)
225 >    sqlscale                    : Short;     (** scale factor **)
226 >    sqlsubtype                  : Short;     (** datatype subtype - BLOBs **)
227 >                                             (** & text types only **)
228 >    sqllen                      : Short;     (** length of data area **)
229 >    sqldata                     : PChar;     (** address of data **)
230 >    sqlind                      : PShort;    (** address of indicator **)
231 >                                             (** variable **)
232 >    sqlname_length              : Short;     (** length of sqlname field **)
233 >    (** name of field, name length + space for NULL **)
234 >    sqlname                     : array[0..31] of Char;
235 >    relname_length              : Short;     (** length of relation name **)
236 >    (** field's relation name + space for NULL **)
237 >    relname                     : array[0..31] of Char;
238 >    ownname_length              : Short;     (** length of owner name **)
239 >    (** relation's owner name + space for NULL **)
240 >    ownname                     : array[0..31] of Char;
241 >    aliasname_length            : Short;     (** length of alias name **)
242 >    (** relation's alias name + space for NULL **)
243 >    aliasname                   : array[0..31] of Char;
244 >  end;  // TXSQLVAR
245 >  PXSQLVAR                      = ^TXSQLVAR;
246 >
247 >  TXSQLDA = record
248 >    version                     : Short;     (** version of this XSQLDA **)
249 >    (** XSQLDA name field **)
250 >    sqldaid                     : array[0..7] of Char;
251 >    sqldabc                     : ISC_LONG;  (** length in bytes of SQLDA **)
252 >    sqln                        : Short;     (** number of fields allocated **)
253 >    sqld                        : Short;     (** actual number of fields **)
254 >    (** first field address **)
255 >    sqlvar                      : array[0..0] of TXSQLVAR;
256 >  end; // TXSQLDA
257 >  PXSQLDA                       = ^TXSQLDA;
258 >
259 > (********************************************************)
260 > (** This record type is for passing arguments to       **)
261 > (** isc_start_transaction (See docs)                   **)
262 > (********************************************************)
263 >  TISC_START_TRANS = record
264 >    db_handle      : PISC_DB_HANDLE;
265 >    tpb_length     : UShort;
266 >    tpb_address    : PChar;
267 >  end;
268 >
269 > (********************************************************)
270 > (** This record type is for passing arguments to       **)
271 > (** isc_start_multiple (see docs)                      **)
272 > (********************************************************)
273 >  TISC_TEB = record
274 >    db_handle      : PISC_DB_HANDLE;
275 >    tpb_length     : Long;
276 >    tpb_address    : PChar;
277 >  end;
278 >  PISC_TEB = ^TISC_TEB;
279 >  TISC_TEB_ARRAY = array[0..0] of TISC_TEB;
280 >  PISC_TEB_ARRAY = ^TISC_TEB_ARRAY;
281 >
282 > (*****************************)
283 > (** OSRI database functions **)
284 > (*****************************)
285 >
286 > Tisc_attach_database = function (status_vector            : PISC_STATUS;
287 >                                 db_name_length           : Short;
288 >                                 db_name                  : PChar;
289 >                                 db_handle                : PISC_DB_HANDLE;
290 >                                 parm_buffer_length       : Short;
291 >                                 parm_buffer              : PChar): ISC_STATUS;
292 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
293 >
294 > Tisc_array_gen_sdl = function   (status_vector            : PISC_STATUS;
295 >                                 isc_array_desc           : PISC_ARRAY_DESC;
296 >                                 isc_arg3                 : PShort;
297 >                                 isc_arg4                 : PChar;
298 >                                 isc_arg5                 : PShort): ISC_STATUS;
299 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
300 >
301 > Tisc_array_get_slice = function (status_vector            : PISC_STATUS;
302 >                                 db_handle                : PISC_DB_HANDLE;
303 >                                 trans_handle             : PISC_TR_HANDLE;
304 >                                 array_id                 : PISC_QUAD;
305 >                                 descriptor               : PISC_ARRAY_DESC;
306 >                                 dest_array               : PVoid;
307 >                                 slice_length             : ISC_LONG): ISC_STATUS;
308 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
309 >
310 > Tisc_array_lookup_bounds = function (status_vector        : PISC_STATUS;
311 >                                 db_handle                : PISC_DB_HANDLE;
312 >                                 trans_handle             : PISC_TR_HANDLE;
313 >                                 table_name,
314 >                                 column_name              : PChar;
315 >                                 descriptor               : PISC_ARRAY_DESC): ISC_STATUS;
316 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
317 >
318 > Tisc_array_lookup_desc = function (status_vector          : PISC_STATUS;
319 >                                 db_handle                : PISC_DB_HANDLE;
320 >                                 trans_handle             : PISC_TR_HANDLE;
321 >                                 table_name,
322 >                                 column_name              : PChar;
323 >                                 descriptor               : PISC_ARRAY_DESC): ISC_STATUS;
324 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
325 >
326 > Tisc_array_set_desc = function  (status_vector            : PISC_STATUS;
327 >                                 table_name               : PChar;
328 >                                 column_name              : PChar;
329 >                                 sql_dtype,
330 >                                 sql_length,
331 >                                 sql_dimensions           : PShort;
332 >                                 descriptor               : PISC_ARRAY_DESC): ISC_STATUS;
333 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
334 >
335 > Tisc_array_put_slice = function (status_vector            : PISC_STATUS;
336 >                                 db_handle                : PISC_DB_HANDLE;
337 >                                 trans_handle             : PISC_TR_HANDLE;
338 >                                 array_id                 : PISC_QUAD;
339 >                                 descriptor               : PISC_ARRAY_DESC;
340 >                                 source_array             : PVoid;
341 >                                 slice_length             : PISC_LONG): ISC_STATUS;
342 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
343 >
344 > Tisc_blob_default_desc = procedure  (descriptor           : PISC_BLOB_DESC;
345 >                                 table_name               : PUChar;
346 >                                 column_name              : PUChar);
347 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
348 >
349 > Tisc_blob_gen_bpb = function    (status_vector            : PISC_STATUS;
350 >                                 to_descriptor,
351 >                                 from_descriptor          : PISC_BLOB_DESC;
352 >                                 bpb_buffer_length        : UShort;
353 >                                 bpb_buffer               : PUChar;
354 >                                 bpb_length               : PUShort): ISC_STATUS;
355 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
356 >
357 > Tisc_blob_info = function       (status_vector            : PISC_STATUS;
358 >                                 blob_handle              : PISC_BLOB_HANDLE;
359 >                                 item_list_buffer_length  : Short;
360 >                                 item_list_buffer         : PChar;
361 >                                 result_buffer_length     : Short;
362 >                                 result_buffer            : PChar): ISC_STATUS;
363 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
364 >
365 > Tisc_blob_lookup_desc = function (status_vector           : PISC_STATUS;
366 >                                 db_handle                : PISC_DB_HANDLE;
367 >                                 trans_handle             : PISC_TR_HANDLE;
368 >                                 table_name,
369 >                                 column_name              : PChar;
370 >                                 descriptor               : PISC_BLOB_DESC;
371 >                                 global                   : PUChar): ISC_STATUS;
372 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
373 >
374 > Tisc_blob_set_desc = function   (status_vector            : PISC_STATUS;
375 >                                 table_name,
376 >                                 column_name              : PChar;
377 >                                 subtype,
378 >                                 charset,
379 >                                 segment_size             : Short;
380 >                                 descriptor               : PISC_BLOB_DESC): ISC_STATUS;
381 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
382 >
383 > Tisc_cancel_blob = function     (status_vector            : PISC_STATUS;
384 >                                 blob_handle              : PISC_BLOB_HANDLE): ISC_STATUS;
385 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
386 >
387 > Tisc_cancel_events = function   (status_vector            : PISC_STATUS;
388 >                                 db_handle                : PISC_DB_HANDLE;
389 >                                 event_id                 : PISC_LONG): ISC_STATUS;
390 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
391 >
392 > Tisc_close_blob = function      (status_vector            : PISC_STATUS;
393 >                                 blob_handle              : PISC_BLOB_HANDLE): ISC_STATUS;
394 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
395 >
396 > Tisc_commit_retaining = function (status_vector           : PISC_STATUS;
397 >                                 tran_handle              : PISC_TR_HANDLE): ISC_STATUS;
398 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
399 >
400 > Tisc_commit_transaction = function  (status_vector        : PISC_STATUS;
401 >                                 tran_handle              : PISC_TR_HANDLE): ISC_STATUS;
402 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
403 >
404 > Tisc_create_blob = function     (status_vector            : PISC_STATUS;
405 >                                 db_handle                : PISC_DB_HANDLE;
406 >                                 tran_handle              : PISC_TR_HANDLE;
407 >                                 blob_handle              : PISC_BLOB_HANDLE;
408 >                                 blob_id                  : PISC_QUAD): ISC_STATUS;
409 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
410 >
411 > Tisc_create_blob2 = function    (status_vector            : PISC_STATUS;
412 >                                 db_handle                : PISC_DB_HANDLE;
413 >                                 tran_handle              : PISC_TR_HANDLE;
414 >                                 blob_handle              : PISC_BLOB_HANDLE;
415 >                                 blob_id                  : PISC_QUAD;
416 >                                 bpb_length               : Short;
417 >                                 bpb_address              : PChar): ISC_STATUS;
418 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
419 >
420 > Tisc_create_database = function (status_vector            : PISC_STATUS;
421 >                                 isc_arg2                 : Short;
422 >                                 isc_arg3                 : PChar;
423 >                                 db_handle                : PISC_DB_HANDLE;
424 >                                 isc_arg5                 : Short;
425 >                                 isc_arg6                 : PChar;
426 >                                 isc_arg7                 : Short): ISC_STATUS;
427 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
428 >
429 > Tisc_database_info = function   (status_vector            : PISC_STATUS;
430 >                                 db_handle                : PISC_DB_HANDLE;
431 >                                 item_list_buffer_length  : Short;
432 >                                 item_list_buffer         : PChar;
433 >                                 result_buffer_length     : Short;
434 >                                 result_buffer            : PChar): ISC_STATUS;
435 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
436 >
437 > Tisc_decode_date = procedure    (ib_date: PISC_QUAD;
438 >                                 tm_date: PCTimeStructure);
439 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
440 >
441 > Tisc_decode_sql_date = procedure (ib_date: PISC_DATE;
442 >                                 tm_date: PCTimeStructure);
443 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
444 >
445 > Tisc_decode_sql_time = procedure  (ib_time: PISC_TIME;
446 >                                 tm_date: PCTimeStructure);
447 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
448 >
449 > Tisc_decode_timestamp = procedure  (ib_timestamp: PISC_TIMESTAMP;
450 >                                 tm_date: PCTimeStructure);
451 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
452 >
453 > Tisc_detach_database = function (status_vector            : PISC_STATUS;
454 >                                 db_handle                : PISC_DB_HANDLE): ISC_STATUS;
455 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
456 >
457 > Tisc_drop_database = function   (status_vector            : PISC_STATUS;
458 >                                 db_handle                : PISC_DB_HANDLE): ISC_STATUS;
459 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
460 >
461 > Tisc_dsql_allocate_statement = function (status_vector    : PISC_STATUS;
462 >                                 db_handle                : PISC_DB_HANDLE;
463 >                                 stmt_handle              : PISC_STMT_HANDLE): ISC_STATUS;
464 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
465 >
466 > Tisc_dsql_alloc_statement2 = function (status_vector      : PISC_STATUS;
467 >                                 db_handle                : PISC_DB_HANDLE;
468 >                                 stmt_handle              : PISC_STMT_HANDLE): ISC_STATUS;
469 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
470 >
471 > Tisc_dsql_describe = function   (status_vector            : PISC_STATUS;
472 >                                 stmt_handle              : PISC_STMT_HANDLE;
473 >                                 dialect                  : UShort;
474 >                                 xsqlda                   : PXSQLDA): ISC_STATUS;
475 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
476 >
477 > Tisc_dsql_describe_bind = function  (status_vector        : PISC_STATUS;
478 >                                 stmt_handle              : PISC_STMT_HANDLE;
479 >                                 dialect                  : UShort;
480 >                                 xsqlda                   : PXSQLDA): ISC_STATUS;
481 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
482 >
483 > Tisc_dsql_exec_immed2 = function (status_vector           : PISC_STATUS;
484 >                                 db_handle                : PISC_DB_HANDLE;
485 >                                 tran_handle              : PISC_TR_HANDLE;
486 >                                 length                   : UShort;
487 >                                 statement                : PChar;
488 >                                 dialect                  : UShort;
489 >                                 in_xsqlda,
490 >                                 out_xsqlda               : PXSQLDA): ISC_STATUS;
491 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
492 >
493 > Tisc_dsql_execute = function    (status_vector            : PISC_STATUS;
494 >                                 tran_handle              : PISC_TR_HANDLE;
495 >                                 stmt_handle              : PISC_STMT_HANDLE;
496 >                                 dialect                  : UShort;
497 >                                 xsqlda                   : PXSQLDA): ISC_STATUS;
498 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
499 >
500 > Tisc_dsql_execute2 = function   (status_vector            : PISC_STATUS;
501 >                                 tran_handle              : PISC_TR_HANDLE;
502 >                                 stmt_handle              : PISC_STMT_HANDLE;
503 >                                 dialect                  : UShort;
504 >                                 in_xsqlda,
505 >                                 out_xsqlda               : PXSQLDA): ISC_STATUS;
506 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
507 >
508 > Tisc_dsql_execute_immediate = function (status_vector     : PISC_STATUS;
509 >                                 db_handle                : PISC_DB_HANDLE;
510 >                                 tran_handle              : PISC_TR_HANDLE;
511 >                                 length                   : UShort;
512 >                                 statement                : PChar;
513 >                                 dialect                  : UShort;
514 >                                 xsqlda                   : PXSQLDA): ISC_STATUS;
515 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
516 >
517 > Tisc_dsql_fetch = function      (status_vector            : PISC_STATUS;
518 >                                 stmt_handle              : PISC_STMT_HANDLE;
519 >                                 dialect                  : UShort;
520 >                                 xsqlda                   : PXSQLDA): ISC_STATUS;
521 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
522 >
523 > (*$ifdef SCROLLABLE_CURSORS*)
524 > Tisc_dsql_fetch2 = function     (status_vector            : PISC_STATUS;
525 >                                 stmt_handle              : PISC_STMT_HANDLE;
526 >                                 dialect                  : UShort;
527 >                                 xsqlda                   : PXSQLDA;
528 >                                 isc_arg5                 : UShort;
529 >                                 isc_arg6                 : Long): ISC_STATUS;
530 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
531 > (*$endif*)
532 >
533 > Tisc_dsql_finish = function    (db_handle                : PISC_DB_HANDLE): ISC_STATUS;
534 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
535 >
536 > Tisc_dsql_free_statement = function (status_vector        : PISC_STATUS;
537 >                                 stmt_handle              : PISC_STMT_HANDLE;
538 >                                 options                  : UShort): ISC_STATUS;
539 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
540 >
541 > Tisc_dsql_insert = function     (status_vector            : PISC_STATUS;
542 >                                 stmt_handle              : PISC_STMT_HANDLE;
543 >                                 arg3                     : UShort;
544 >                                 xsqlda                   : PXSQLDA): ISC_STATUS;
545 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
546 >
547 > Tisc_dsql_prepare = function    (status_vector            : PISC_STATUS;
548 >                                 tran_handle              : PISC_TR_HANDLE;
549 >                                 stmt_handle              : PISC_STMT_HANDLE;
550 >                                 length                   : UShort;
551 >                                 statement                : PChar;
552 >                                 dialect                  : UShort;
553 >                                 xsqlda                   : PXSQLDA): ISC_STATUS;
554 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
555 >
556 > Tisc_dsql_set_cursor_name = function (status_vector        : PISC_STATUS;
557 >                                 stmt_handle               : PISC_STMT_HANDLE;
558 >                                 cursor_name               : PChar;
559 >                                 _type                     : UShort): ISC_STATUS;
560 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
561 >
562 > Tisc_dsql_sql_info = function   (status_vector             : PISC_STATUS;
563 >                                 stmt_handle               : PISC_STMT_HANDLE;
564 >                                 item_length               : Short;
565 >                                 items                     : PChar;
566 >                                 buffer_length             : Short;
567 >                                 buffer                    : PChar): ISC_STATUS;
568 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
569 >
570 > Tisc_encode_date = procedure    (tm_date                    : PCTimeStructure;
571 >                                 ib_date                    : PISC_QUAD);
572 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
573 >
574 > Tisc_encode_sql_date = procedure (tm_date                   : PCTimeStructure;
575 >                                 ib_date                    : PISC_DATE);
576 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
577 >
578 > Tisc_encode_sql_time = procedure (tm_date                   : PCTimeStructure;
579 >                                 ib_time                    : PISC_TIME);
580 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
581 >
582 > Tisc_encode_timestamp = procedure (tm_date                  : PCTimeStructure;
583 >                                 ib_timestamp               : PISC_TIMESTAMP);
584 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
585 >
586 > Tisc_event_block = function     (event_buffer               : PPChar;
587 >                                 result_buffer              : PPChar;
588 >                                 id_count                   : UShort):ISC_LONG;
589 >                                 varargs; cdecl;
590 >
591 > Tisc_event_counts = procedure   (status_vector             : PISC_LONG;
592 >                                 buffer_length             : Short;
593 >                                 event_buffer              : PChar;
594 >                                 result_buffer             : PChar);
595 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
596 >
597 > Tisc_expand_dpb = procedure     (dpb                       : PPChar;
598 >                                 dpb_length                : PShort;
599 >                                 item_list                 : array of Pointer);
600 >                                cdecl;
601 >
602 > Tisc_modify_dpb = function      (dpb                       : PPChar;
603 >                                 isc_arg2,
604 >                                 isc_arg3                  : PShort;
605 >                                 isc_arg4                  : UShort;
606 >                                 isc_arg5                  : PChar;
607 >                                 isc_arg6                  : Short): Int;
608 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
609 >
610 > Tisc_free = function           (isc_arg1                  : PChar): ISC_LONG;
611 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
612 >
613 > Tisc_get_segment = function     (status_vector             : PISC_STATUS;
614 >                                 blob_handle               : PISC_BLOB_HANDLE;
615 >                                 actual_seg_length         : PUShort;
616 >                                 seg_buffer_length         : UShort;
617 >                                 seg_buffer                : PChar): ISC_STATUS;
618 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
619 >
620 > Tisc_get_slice = function       (status_vector             : PISC_STATUS;
621 >                                 db_handle                 : PISC_DB_HANDLE;
622 >                                 tran_handle               : PISC_TR_HANDLE;
623 >                                 isc_arg4                  : PISC_QUAD;
624 >                                 isc_arg5                  : Short;
625 >                                 isc_arg6                  : PChar;
626 >                                 isc_arg7                  : Short;
627 >                                 isc_arg8                  : PISC_LONG;
628 >                                 isc_arg9                  : ISC_LONG;
629 >                                 isc_arg10                 : PVoid;
630 >                                 isc_arg11                 : PISC_LONG): ISC_STATUS;
631 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
632 >
633 > Tisc_interprete = function      (buffer                    : PChar;
634 >                                 status_vector             : PPISC_STATUS): ISC_STATUS;
635 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
636 >
637 > Tisc_open_blob = function       (status_vector             : PISC_STATUS;
638 >                                 db_handle                 : PISC_DB_HANDLE;
639 >                                 tran_handle               : PISC_TR_HANDLE;
640 >                                 blob_handle               : PISC_BLOB_HANDLE;
641 >                                 blob_id                   : PISC_QUAD): ISC_STATUS;
642 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
643 >
644 > Tisc_open_blob2 = function      (status_vector             : PISC_STATUS;
645 >                                 db_handle                 : PISC_DB_HANDLE;
646 >                                 tran_handle               : PISC_TR_HANDLE;
647 >                                 blob_handle               : PISC_BLOB_HANDLE;
648 >                                 blob_id                   : PISC_QUAD;
649 >                                 bpb_length                : Short;
650 >                                 bpb_buffer                : PChar): ISC_STATUS;
651 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
652 >
653 > Tisc_prepare_transaction2 = function (status_vector        : PISC_STATUS;
654 >                                 tran_handle               : PISC_TR_HANDLE;
655 >                                 msg_length                : Short;
656 >                                 msg                       : PChar): ISC_STATUS;
657 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
658 >
659 > Tisc_print_sqlerror = procedure (sqlcode                   : Short;
660 >                                 status_vector             : PISC_STATUS);
661 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
662 >
663 > Tisc_print_status = function   (status_vector              : PISC_STATUS): ISC_STATUS;
664 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
665 >
666 > Tisc_put_segment = function     (status_vector             : PISC_STATUS;
667 >                                 blob_handle               : PISC_BLOB_HANDLE;
668 >                                 seg_buffer_len            : UShort;
669 >                                 seg_buffer                : PChar): ISC_STATUS;
670 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
671 >
672 > Tisc_put_slice = function       (status_vector             : PISC_STATUS;
673 >                                 db_handle                 : PISC_DB_HANDLE;
674 >                                 tran_handle               : PISC_TR_HANDLE;
675 >                                 isc_arg4                  : PISC_QUAD;
676 >                                 isc_arg5                  : Short;
677 >                                 isc_arg6                  : PChar;
678 >                                 isc_arg7                  : Short;
679 >                                 isc_arg8                  : PISC_LONG;
680 >                                 isc_arg9                  : ISC_LONG;
681 >                                 isc_arg10                 : PVoid): ISC_STATUS;
682 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
683 >
684 > Tisc_que_events = function      (status_vector             : PISC_STATUS;
685 >                                 db_handle                 : PISC_DB_HANDLE;
686 >                                 event_id                  : PISC_LONG;
687 >                                 length                    : Short;
688 >                                 event_buffer              : PChar;
689 >                                 event_function            : TISC_CALLBACK;
690 >                                 event_function_arg        : PVoid): ISC_STATUS;
691 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
692 >
693 > Tisc_rollback_retaining = function (status_vector         : PISC_STATUS;
694 >                                 tran_handle              : PISC_TR_HANDLE): ISC_STATUS;
695 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
696 >
697 > Tisc_rollback_transaction = function (status_vector        : PISC_STATUS;
698 >                                 tran_handle               : PISC_TR_HANDLE): ISC_STATUS;
699 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
700 >
701 > Tisc_start_multiple = function  (status_vector             : PISC_STATUS;
702 >                                 tran_handle               : PISC_TR_HANDLE;
703 >                                 db_handle_count           : Short;
704 >                                 teb_vector_address        : PISC_TEB): ISC_STATUS;
705 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
706 >
707 > Tisc_start_transaction = function (status_vector           : PISC_STATUS;
708 >                                 tran_handle               : PISC_TR_HANDLE;
709 >                                 db_handle_count           : Short;
710 >                                 db_handle                 : PISC_DB_HANDLE;
711 >                                 tpb_length                : UShort;
712 >                                 tpb_address               : PChar): ISC_STATUS;
713 >                                cdecl;
714 >
715 > Tisc_sqlcode = function        (status_vector             : PISC_STATUS): ISC_LONG;
716 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
717 >
718 >
719 > Tisc_sql_interprete = procedure (sqlcode                   : Short;
720 >                                 buffer                    : PChar;
721 >                                 buffer_length             : Short);
722 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
723 >
724 > Tisc_transaction_info = function (status_vector            : PISC_STATUS;
725 >                                 tran_handle               : PISC_TR_HANDLE;
726 >                                 item_list_buffer_length   : Short;
727 >                                 item_list_buffer          : PChar;
728 >                                 result_buffer_length      : Short;
729 >                                 result_buffer             : PChar): ISC_STATUS;
730 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
731 >
732 > Tisc_transact_request = function (status_vector            : PISC_STATUS;
733 >                                 db_handle                 : PISC_DB_HANDLE;
734 >                                 tran_handle               : PISC_TR_HANDLE;
735 >                                 isc_arg4                  : UShort;
736 >                                 isc_arg5                  : PChar;
737 >                                 isc_arg6                  : UShort;
738 >                                 isc_arg7                  : PChar;
739 >                                 isc_arg8                  : UShort;
740 >                                 isc_arg9                  : PChar): ISC_STATUS;
741 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
742 >
743 > Tisc_vax_integer = function     (buffer                    : PChar;
744 >                                 length                    : Short): ISC_LONG;
745 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
746 >
747 > Tisc_portable_integer = function (buffer                   : PChar;
748 >                                 length                    : Short): ISC_INT64;
749 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
750 >
751 > (***************************************)
752 > (** Security Functions and structures **)
753 > (***************************************)
754 >
755 > const
756 >  sec_uid_spec                          = $01;
757 >  sec_gid_spec                          = $02;
758 >  sec_server_spec                       = $04;
759 >  sec_password_spec                     = $08;
760 >  sec_group_name_spec                   = $10;
761 >  sec_first_name_spec                   = $20;
762 >  sec_middle_name_spec                  = $40;
763 >  sec_last_name_spec                    = $80;
764 >  sec_dba_user_name_spec                = $100;
765 >  sec_dba_password_spec                 = $200;
766 >
767 >  sec_protocol_tcpip                    = 1;
768 >  sec_protocol_netbeui                  = 2;
769 >  sec_protocol_spx                      = 3;
770 >  sec_protocol_local                    = 4;
771 >
772 > type
773 >  TUserSecData = record
774 >    sec_flags: Short;                (** which fields are specified **)
775 >    uid: Int;                        (** the user's id **)
776 >    gid: int;                        (** the user's group id **)
777 >    protocol: Int;                   (** protocol to use for connection **)
778 >    server: PChar;                   (** server to administer **)
779 >    user_name: PChar;                (** the user's name **)
780 >    password: PChar;                 (** the user's password **)
781 >    group_name: PChar;               (** the group name **)
782 >    first_name: PChar;               (** the user's first name **)
783 >    middle_name: PChar;              (** the user's middle name **)
784 >    last_name: PChar;                (** the user's last name **)
785 >    dba_user_name: PChar;            (** the dba user name **)
786 >    dba_password: PChar;             (** the dba password **)
787 >  end;
788 >  PUserSecData = ^TUserSecData;
789 >
790 > Tisc_add_user = function        (status_vector             : PISC_STATUS;
791 >                                 user_sec_data             : PUserSecData): ISC_STATUS;
792 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
793 >
794 > Tisc_delete_user = function     (status_vector             : PISC_STATUS;
795 >                                 user_sec_data             : PUserSecData): ISC_STATUS;
796 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
797 >
798 > Tisc_modify_user = function     (status_vector             : PISC_STATUS;
799 >                                 user_sec_data             : PUserSecData): ISC_STATUS;
800 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
801 >
802 > (************************************)
803 > (**  Other OSRI functions          **)
804 > (************************************)
805 >
806 > Tisc_compile_request = function (status_vector             : PISC_STATUS;
807 >                                 db_handle                 : PISC_DB_HANDLE;
808 >                                 request_handle            : PISC_REQ_HANDLE;
809 >                                 isc_arg4                  : Short;
810 >                                 isc_arg5                  : PChar): ISC_STATUS;
811 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
812 >
813 > Tisc_compile_request2 = function (status_vector            : PISC_STATUS;
814 >                                 db_handle                 : PISC_DB_HANDLE;
815 >                                 request_handle            : PISC_REQ_HANDLE;
816 >                                 isc_arg4                  : Short;
817 >                                 isc_arg5                  : PChar): ISC_STATUS;
818 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
819 >
820 > Tisc_ddl = function             (status_vector             : PISC_STATUS;
821 >                                 db_handle                 : PISC_DB_HANDLE;
822 >                                 tran_handle               : PISC_TR_HANDLE;
823 >                                 isc_arg4                  : Short;
824 >                                 isc_arg5                  : PChar): ISC_STATUS;
825 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
826 >
827 > Tisc_prepare_transaction = function (status_vector         : PISC_STATUS;
828 >                                 tran_handle               : PISC_TR_HANDLE): ISC_STATUS;
829 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
830 >
831 >
832 > Tisc_receive = function         (status_vector             : PISC_STATUS;
833 >                                 request_handle            : PISC_REQ_HANDLE;
834 >                                 isc_arg3,
835 >                                 isc_arg4                  : Short;
836 >                                 isc_arg5                  : PVoid;
837 >                                 isc_arg6                  : Short): ISC_STATUS;
838 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
839 >
840 > Tisc_receive2 = function        (status_vector             : PISC_STATUS;
841 >                                 request_handle            : PISC_REQ_HANDLE;
842 >                                 isc_arg3,
843 >                                 isc_arg4                  : Short;
844 >                                 isc_arg5                  : PVoid;
845 >                                 isc_arg6,
846 >                                 isc_arg7                  : Short;
847 >                                 isc_arg8                  : Long): ISC_STATUS;
848 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
849 >
850 > Tisc_reconnect_transaction = function (status_vector       : PISC_STATUS;
851 >                                 db_handle                 : PISC_DB_HANDLE;
852 >                                 tran_handle               : PISC_TR_HANDLE;
853 >                                 isc_arg4                  : Short;
854 >                                 isc_arg5                  : PChar): ISC_STATUS;
855 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
856 >
857 > Tisc_release_request = function (status_vector             : PISC_STATUS;
858 >                                 request_handle            : PISC_REQ_HANDLE): ISC_STATUS;
859 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
860 >
861 > Tisc_request_info = function    (status_vector             : PISC_STATUS;
862 >                                 request_handle            : PISC_REQ_HANDLE;
863 >                                 isc_arg3                  : Short;
864 >                                 isc_arg4                  : Short;
865 >                                 isc_arg5                  : PChar;
866 >                                 isc_arg6                  : Short;
867 >                                 isc_arg7                  : PChar): ISC_STATUS;
868 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
869 >
870 > Tisc_seek_blob = function       (status_vector             : PISC_STATUS;
871 >                                 blob_handle               : PISC_BLOB_HANDLE;
872 >                                 isc_arg3                  : Short;
873 >                                 isc_arg4                  : ISC_LONG;
874 >                                 isc_arg5                  : PISC_LONG): ISC_STATUS;
875 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
876 >
877 > Tisc_send = function            (status_vector             : PISC_STATUS;
878 >                                 request_handle            : PISC_REQ_HANDLE;
879 >                                 isc_arg3,
880 >                                 isc_arg4                  : Short;
881 >                                 isc_arg5                  : PVoid;
882 >                                 isc_arg6                  : Short): ISC_STATUS;
883 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
884 >
885 > Tisc_start_and_send = function  (status_vector             : PISC_STATUS;
886 >                                 request_handle            : PISC_REQ_HANDLE;
887 >                                 tran_handle               : PISC_TR_HANDLE;
888 >                                 isc_arg4,
889 >                                 isc_arg5                  : Short;
890 >                                 isc_arg6                  : PVoid;
891 >                                 isc_arg7                  : Short): ISC_STATUS;
892 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
893 >
894 > Tisc_start_request = function   (status_vector             : PISC_STATUS;
895 >                                 request_handle            : PISC_REQ_HANDLE;
896 >                                 tran_handle               : PISC_TR_HANDLE;
897 >                                 isc_arg4                  : Short): ISC_STATUS;
898 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
899 >
900 > Tisc_unwind_request = function  (status_vector             : PISC_STATUS;
901 >                                 tran_handle               : PISC_TR_HANDLE;
902 >                                 isc_arg3                  : Short): ISC_STATUS;
903 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
904 >
905 > Tisc_wait_for_event = function  (status_vector             : PISC_STATUS;
906 >                                 db_handle                 : PISC_DB_HANDLE;
907 >                                 length                    : Short;
908 >                                 event_buffer,
909 >                                 result_buffer             : PChar): ISC_STATUS;
910 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
911 >
912 > (*******************************)
913 > (** Other Sql functions       **)
914 > (*******************************)
915 > {$IFDEF IB5_ONLY}
916 > Tisc_close = function           (status_vector             : PISC_STATUS;
917 >                                 isc_arg2                  : PChar): ISC_STATUS;
918 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
919 >
920 > Tisc_declare = function         (status_vector             : PISC_STATUS;
921 >                                 isc_arg2,
922 >                                 isc_arg3                  : PChar): ISC_STATUS;
923 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
924 >
925 > Tisc_describe = function        (status_vector             : PISC_STATUS;
926 >                                 isc_arg2                  : PChar;
927 >                                 isc_arg3                  : PSQLDA): ISC_STATUS;
928 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
929 >
930 > Tisc_describe_bind = function   (status_vector             : PISC_STATUS;
931 >                                 isc_arg2                  : PChar;
932 >                                 isc_arg3                  : PSQLDA): ISC_STATUS;
933 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
934 >
935 > Tisc_execute = function         (status_vector             : PISC_STATUS;
936 >                                 tran_handle               : PISC_TR_HANDLE;
937 >                                 isc_arg3                  : PChar;
938 >                                 isc_arg4                  : PSQLDA): ISC_STATUS;
939 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
940 >
941 > Tisc_execute_immediate = function (status_vector           : PISC_STATUS;
942 >                                 db_handle                 : PISC_DB_HANDLE;
943 >                                 tran_handle               : PISC_TR_HANDLE;
944 >                                 isc_arg4                  : PShort;
945 >                                 isc_arg5                  : PChar): ISC_STATUS;
946 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
947 >
948 > Tisc_fetch = function           (status_vector             : PISC_STATUS;
949 >                                 isc_arg2                  : PChar;
950 >                                 isc_arg3                  : PSQLDA): ISC_STATUS;
951 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
952 >
953 > Tisc_open = function            (status_vector             : PISC_STATUS;
954 >                                 tran_handle               : PISC_TR_HANDLE;
955 >                                 isc_arg3                  : PChar;
956 >                                 isc_arg4                  : PSQLDA): ISC_STATUS;
957 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
958 >
959 > Tisc_prepare = function         (status_vector             : PISC_STATUS;
960 >                                 db_handle                 : PISC_DB_HANDLE;
961 >                                 tran_handle               : PISC_TR_HANDLE;
962 >                                 isc_arg4                  : PChar;
963 >                                 isc_arg5                  : PShort;
964 >                                 isc_arg6                  : PChar;
965 >                                 isc_arg7                  : PSQLDA): ISC_STATUS;
966 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
967 > {$ELSE}
968 > Tisc_close = function           (status_vector             : PISC_STATUS;
969 >                                 isc_arg2                  : PChar): ISC_STATUS;
970 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
971 >
972 > Tisc_declare = function         (status_vector             : PISC_STATUS;
973 >                                 isc_arg2,
974 >                                 isc_arg3                  : PChar): ISC_STATUS;
975 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
976 >
977 > Tisc_describe = function        (status_vector             : PISC_STATUS;
978 >                                 isc_arg2                  : PChar;
979 >                                 isc_arg3                  : PXSQLDA): ISC_STATUS;
980 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
981 >
982 > Tisc_describe_bind = function   (status_vector             : PISC_STATUS;
983 >                                 isc_arg2                  : PChar;
984 >                                 isc_arg3                  : PXSQLDA): ISC_STATUS;
985 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
986 >
987 > Tisc_execute = function         (status_vector             : PISC_STATUS;
988 >                                 tran_handle               : PISC_TR_HANDLE;
989 >                                 isc_arg3                  : PChar;
990 >                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
991 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
992 >
993 > Tisc_execute_immediate = function (status_vector           : PISC_STATUS;
994 >                                 db_handle                 : PISC_DB_HANDLE;
995 >                                 tran_handle               : PISC_TR_HANDLE;
996 >                                 isc_arg4                  : PShort;
997 >                                 isc_arg5                  : PChar): ISC_STATUS;
998 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
999 >
1000 > Tisc_fetch = function           (status_vector             : PISC_STATUS;
1001 >                                 isc_arg2                  : PChar;
1002 >                                 isc_arg3                  : PXSQLDA): ISC_STATUS;
1003 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1004 >
1005 > Tisc_open = function            (status_vector             : PISC_STATUS;
1006 >                                 tran_handle               : PISC_TR_HANDLE;
1007 >                                 isc_arg3                  : PChar;
1008 >                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
1009 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1010 >
1011 > Tisc_prepare = function         (status_vector             : PISC_STATUS;
1012 >                                 db_handle                 : PISC_DB_HANDLE;
1013 >                                 tran_handle               : PISC_TR_HANDLE;
1014 >                                 isc_arg4                  : PChar;
1015 >                                 isc_arg5                  : PShort;
1016 >                                 isc_arg6                  : PChar;
1017 >                                 isc_arg7                  : PXSQLDA): ISC_STATUS;
1018 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1019 > {$ENDIF}
1020 >
1021 > (***************************************)
1022 > (** Other Dynamic sql functions       **)
1023 > (***************************************)
1024 >
1025 > Tisc_dsql_execute_m = function  (status_vector             : PISC_STATUS;
1026 >                                 tran_handle               : PISC_TR_HANDLE;
1027 >                                 statement_handle          : PISC_STMT_HANDLE;
1028 >                                 isc_arg4                  : UShort;
1029 >                                 isc_arg5                  : PChar;
1030 >                                 isc_arg6                  : UShort;
1031 >                                 isc_arg7                  : UShort;
1032 >                                 isc_arg8                  : PChar): ISC_STATUS;
1033 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1034 >
1035 > Tisc_dsql_execute2_m = function (status_vector             : PISC_STATUS;
1036 >                                 tran_handle               : PISC_TR_HANDLE;
1037 >                                 statement_handle          : PISC_STMT_HANDLE;
1038 >                                 isc_arg4                  : UShort;
1039 >                                 isc_arg5                  : PChar;
1040 >                                 isc_arg6                  : UShort;
1041 >                                 isc_arg7                  : UShort;
1042 >                                 isc_arg8                  : PChar;
1043 >                                 isc_arg9                  : UShort;
1044 >                                 isc_arg10                 : PChar;
1045 >                                 isc_arg11                 : UShort;
1046 >                                 isc_arg12                 : UShort;
1047 >                                 isc_arg13                 : PChar): ISC_STATUS;
1048 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1049 >
1050 > Tisc_dsql_execute_immediate_m = function (status_vector    : PISC_STATUS;
1051 >                                 db_handle                 : PISC_DB_HANDLE;
1052 >                                 tran_handle               : PISC_TR_HANDLE;
1053 >                                 isc_arg4                  : UShort;
1054 >                                 isc_arg5                  : PChar;
1055 >                                 isc_arg6                  : UShort;
1056 >                                 isc_arg7                  : UShort;
1057 >                                 isc_arg8                  : PChar;
1058 >                                 isc_arg9                  : UShort;
1059 >                                 isc_arg10                 : UShort;
1060 >                                 isc_arg11                 : PChar): ISC_STATUS;
1061 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1062 >
1063 > Tisc_dsql_exec_immed3_m = function  (status_vector         : PISC_STATUS;
1064 >                                 db_handle                 : PISC_DB_HANDLE;
1065 >                                 tran_handle               : PISC_TR_HANDLE;
1066 >                                 isc_arg4                  : UShort;
1067 >                                 isc_arg5                  : PChar;
1068 >                                 isc_arg6                  : UShort;
1069 >                                 isc_arg7                  : UShort;
1070 >                                 isc_arg8                  : PChar;
1071 >                                 isc_arg9                  : UShort;
1072 >                                 isc_arg10                 : UShort;
1073 >                                 isc_arg11                 : PChar;
1074 >                                 isc_arg12                 : UShort;
1075 >                                 isc_arg13                 : PChar;
1076 >                                 isc_arg14                 : UShort;
1077 >                                 isc_arg15                 : UShort;
1078 >                                 isc_arg16                 : PChar): ISC_STATUS;
1079 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1080 >
1081 > Tisc_dsql_fetch_m = function    (status_vector             : PISC_STATUS;
1082 >                                 statement_handle          : PISC_STMT_HANDLE;
1083 >                                 isc_arg3                  : UShort;
1084 >                                 isc_arg4                  : PChar;
1085 >                                 isc_arg5                  : UShort;
1086 >                                 isc_arg6                  : UShort;
1087 >                                 isc_arg7                  : PChar): ISC_STATUS;
1088 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1089 >
1090 > (*$ifdef SCROLLABLE_CURSORS*)
1091 > Tisc_dsql_fetch2_m = function   (status_vector             : PISC_STATUS;
1092 >                                 statement_handle          : PISC_STMT_HANDLE;
1093 >                                 isc_arg3                  : UShort;
1094 >                                 isc_arg4                  : PChar;
1095 >                                 isc_arg5                  : UShort;
1096 >                                 isc_arg6                  : UShort;
1097 >                                 isc_arg7                  : PChar;
1098 >                                 isc_arg8                  : UShort;
1099 >                                 isc_arg9                  : Long): ISC_STATUS;
1100 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1101 > (*$endif*)
1102 >
1103 > Tisc_dsql_insert_m = function   (status_vector             : PISC_STATUS;
1104 >                                 statement_handle          : PISC_STMT_HANDLE;
1105 >                                 isc_arg3                  : UShort;
1106 >                                 isc_arg4                  : PChar;
1107 >                                 isc_arg5                  : UShort;
1108 >                                 isc_arg6                  : UShort;
1109 >                                 isc_arg7                  : PChar): ISC_STATUS;
1110 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1111 >
1112 > Tisc_dsql_prepare_m = function  (status_vector             : PISC_STATUS;
1113 >                                 tran_handle               : PISC_TR_HANDLE;
1114 >                                 statement_handle          : PISC_STMT_HANDLE;
1115 >                                 isc_arg4                  : UShort;
1116 >                                 isc_arg5                  : PChar;
1117 >                                 isc_arg6                  : UShort;
1118 >                                 isc_arg7                  : UShort;
1119 >                                 isc_arg8                  : PChar;
1120 >                                 isc_arg9                  : UShort;
1121 >                                 isc_arg10                 : PChar): ISC_STATUS;
1122 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1123 >
1124 > Tisc_dsql_release = function    (status_vector             : PISC_STATUS;
1125 >                                 isc_arg2                  : PChar): ISC_STATUS;
1126 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1127 >
1128 > Tisc_embed_dsql_close = function(status_vector             : PISC_STATUS;
1129 >                                 isc_arg2                  : PChar): ISC_STATUS;
1130 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1131 >
1132 > Tisc_embed_dsql_declare = function  (status_vector         : PISC_STATUS;
1133 >                                 isc_arg2                  : PChar;
1134 >                                 isc_arg3                  : PChar): ISC_STATUS;
1135 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1136 >
1137 > Tisc_embed_dsql_describe = function (status_vector         : PISC_STATUS;
1138 >                                 isc_arg2                  : PChar;
1139 >                                 isc_arg3                  : UShort;
1140 >                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
1141 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1142 >
1143 > Tisc_embed_dsql_describe_bind = function (status_vector    : PISC_STATUS;
1144 >                                 isc_arg2                  : PChar;
1145 >                                 isc_arg3                  : UShort;
1146 >                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
1147 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1148 >
1149 > Tisc_embed_dsql_execute = function  (status_vector         : PISC_STATUS;
1150 >                                 tran_handle               : PISC_TR_HANDLE;
1151 >                                 isc_arg3                  : PChar;
1152 >                                 isc_arg4                  : UShort;
1153 >                                 isc_arg5                  : PXSQLDA): ISC_STATUS;
1154 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1155 >
1156 > Tisc_embed_dsql_execute2 = function (status_vector         : PISC_STATUS;
1157 >                                 tran_handle               : PISC_TR_HANDLE;
1158 >                                 isc_arg3                  : PChar;
1159 >                                 isc_arg4                  : UShort;
1160 >                                 isc_arg5                  : PXSQLDA;
1161 >                                 isc_arg6                  : PXSQLDA): ISC_STATUS;
1162 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1163 >
1164 > Tisc_embed_dsql_execute_immed = function (status_vector    : PISC_STATUS;
1165 >                                 db_handle                 : PISC_DB_HANDLE;
1166 >                                 tran_handle               : PISC_TR_HANDLE;
1167 >                                 isc_arg4                  : UShort;
1168 >                                 isc_arg5                  : PChar;
1169 >                                 isc_arg6                  : UShort;
1170 >                                 isc_arg7                  : PXSQLDA): ISC_STATUS;
1171 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1172 >
1173 > Tisc_embed_dsql_fetch = function(status_vector             : PISC_STATUS;
1174 >                                 isc_arg2                  : PChar;
1175 >                                 isc_arg3                  : UShort;
1176 >                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
1177 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1178 >
1179 > (*$ifdef SCROLLABLE_CURSORS*)
1180 > Tisc_embed_dsql_fetch2 = function  (status_vector         : PISC_STATUS;
1181 >                                isc_arg2                  : PChar;
1182 >                                isc_arg3                  : UShort;
1183 >                                isc_arg4                  : PXSQLDA;
1184 >                                isc_arg5                  : UShort;
1185 >                                isc_arg6                  : Long): ISC_STATUS;
1186 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1187 > (*$endif*)
1188 >
1189 > Tisc_embed_dsql_open = function (status_vector             : PISC_STATUS;
1190 >                                 tran_handle               : PISC_TR_HANDLE;
1191 >                                 isc_arg3                  : PChar;
1192 >                                 isc_arg4                  : UShort;
1193 >                                 isc_arg5                  : PXSQLDA): ISC_STATUS;
1194 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1195 >
1196 > Tisc_embed_dsql_open2 = function (status_vector            : PISC_STATUS;
1197 >                                 tran_handle               : PISC_TR_HANDLE;
1198 >                                 isc_arg3                  : PChar;
1199 >                                 isc_arg4                  : UShort;
1200 >                                 isc_arg5                  : PXSQLDA;
1201 >                                 isc_arg6                  : PXSQLDA): ISC_STATUS;
1202 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1203 >
1204 > Tisc_embed_dsql_insert = function (status_vector           : PISC_STATUS;
1205 >                                 isc_arg2                  : PChar;
1206 >                                 isc_arg3                  : UShort;
1207 >                                 isc_arg4                  : PXSQLDA): ISC_STATUS;
1208 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1209 >
1210 > Tisc_embed_dsql_prepare = function  (status_vector         : PISC_STATUS;
1211 >                                 db_handle                 : PISC_DB_HANDLE;
1212 >                                 tran_handle               : PISC_TR_HANDLE;
1213 >                                 isc_arg4                  : PChar;
1214 >                                 isc_arg5                  : UShort;
1215 >                                 isc_arg6                  : PChar;
1216 >                                 isc_arg7                  : UShort;
1217 >                                 isc_arg8                  : PXSQLDA): ISC_STATUS;
1218 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1219 >
1220 > Tisc_embed_dsql_release = function  (status_vector         : PISC_STATUS;
1221 >                                 isc_arg2                  : PChar): ISC_STATUS;
1222 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1223 >
1224 > (********************************)
1225 > (** Other Blob functions       **)
1226 > (********************************)
1227 >
1228 > TBLOB_open = function           (blob_handle               : TISC_BLOB_HANDLE;
1229 >                                 isc_arg2                  : PChar;
1230 >                                 isc_arg3                  : int): PBSTREAM;
1231 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1232 >
1233 > TBLOB_put = function            (isc_arg1                  : char;
1234 >                                 isc_arg2                  : PBSTREAM): Int;
1235 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1236 >
1237 > TBLOB_close = function         (isc_arg1                  : PBSTREAM): Int;
1238 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1239 >
1240 > TBLOB_get = function           (isc_arg1                  : PBSTREAM): Int;
1241 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1242 >
1243 > TBLOB_display = function        (isc_arg1                  : PISC_QUAD;
1244 >                                 db_handle                 : TISC_DB_HANDLE;
1245 >                                 tran_handle               : TISC_TR_HANDLE;
1246 >                                 isc_arg4                  : PChar): Int;
1247 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1248 >
1249 > TBLOB_dump = function           (isc_arg1                  : PISC_QUAD;
1250 >                                 db_handle                 : TISC_DB_HANDLE;
1251 >                                 tran_handle               : TISC_TR_HANDLE;
1252 >                                 isc_arg4                  : PChar): Int;
1253 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1254 >
1255 > TBLOB_edit = function           (isc_arg1                  : PISC_QUAD;
1256 >                                 db_handle                 : TISC_DB_HANDLE;
1257 >                                 tran_handle               : TISC_TR_HANDLE;
1258 >                                 isc_arg4                  : PChar): Int;
1259 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1260 >
1261 > TBLOB_load = function           (isc_arg1                  : PISC_QUAD;
1262 >                                 db_handle                 : TISC_DB_HANDLE;
1263 >                                 tran_handle               : TISC_TR_HANDLE;
1264 >                                 isc_arg4                  : PChar): Int;
1265 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1266 >
1267 > TBLOB_text_dump = function      (isc_arg1                  : PISC_QUAD;
1268 >                                 db_handle                 : TISC_DB_HANDLE;
1269 >                                 tran_handle               : TISC_TR_HANDLE;
1270 >                                 isc_arg4                  : PChar): Int;
1271 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1272 >
1273 > TBLOB_text_load = function      (isc_arg1                  : PISC_QUAD;
1274 >                                 db_handle                 : TISC_DB_HANDLE;
1275 >                                 tran_handle               : TISC_TR_HANDLE;
1276 >                                 isc_arg4                  : PChar): Int;
1277 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1278 >
1279 > TBopen = function               (isc_arg1                  : PISC_QUAD;
1280 >                                 db_handle                 : TISC_DB_HANDLE;
1281 >                                 tran_handle               : TISC_TR_HANDLE;
1282 >                                 isc_arg4                  : PChar): Int;
1283 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1284 >
1285 > TBopen2 = function              (isc_arg1                  : PISC_QUAD;
1286 >                                 db_handle                 : TISC_DB_HANDLE;
1287 >                                 tran_handle               : TISC_TR_HANDLE;
1288 >                                 isc_arg4                  : PChar;
1289 >                                 isc_arg5                  : UShort): PBSTREAM;
1290 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1291 >
1292 > (********************************)
1293 > (** Other Misc functions       **)
1294 > (********************************)
1295 >
1296 > Tisc_ftof = function            (isc_arg1                  : PChar;
1297 >                                 isc_arg2                  : UShort;
1298 >                                 isc_arg3                  : PChar;
1299 >                                 isc_arg4                  : UShort): ISC_LONG;
1300 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1301 >
1302 > Tisc_print_blr = function       (isc_arg1                  : PChar;
1303 >                                 isc_arg2                  : TISC_CALLBACK;
1304 >                                 isc_arg3                  : PVoid;
1305 >                                 isc_arg4                  : Short): ISC_STATUS;
1306 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1307 >
1308 > Tisc_set_debug = procedure     (isc_arg1                  : Int);
1309 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1310 >
1311 > Tisc_qtoq = procedure           (isc_arg1                  : PISC_QUAD;
1312 >                                 isc_arg2                  : PISC_QUAD);
1313 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1314 >
1315 > Tisc_vtof = procedure           (isc_arg1                  : PChar;
1316 >                                 isc_arg2                  : PChar;
1317 >                                 isc_arg3                  : UShort);
1318 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1319 >
1320 > Tisc_vtov = procedure           (isc_arg1                  : PChar;
1321 >                                 isc_arg2                  : PChar;
1322 >                                 isc_arg3                  : Short);
1323 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1324 >
1325 > Tisc_version = function         (db_handle                 : PISC_DB_HANDLE;
1326 >                                 isc_arg2                  : TISC_CALLBACK;
1327 >                                 isc_arg3                  : PVoid): Int;
1328 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1329 >
1330 > Tisc_reset_fpe = function      (isc_arg1                  : UShort): ISC_LONG;
1331 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1332 >
1333 > (*******************************************)
1334 > (** Service manager functions             **)
1335 > (*******************************************)
1336 >
1337 > Tisc_service_attach = function  (status_vector             : PISC_STATUS;
1338 >                                 isc_arg2                  : UShort;
1339 >                                 isc_arg3                  : PChar;
1340 >                                 service_handle            : PISC_SVC_HANDLE;
1341 >                                 isc_arg5                  : UShort;
1342 >                                 isc_arg6                  : PChar): ISC_STATUS;
1343 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1344 >
1345 > Tisc_service_detach = function (status_vector             : PISC_STATUS;
1346 >                                service_handle            : PISC_SVC_HANDLE): ISC_STATUS;
1347 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1348 >
1349 > Tisc_service_query = function   (status_vector             : PISC_STATUS;
1350 >                                 service_handle            : PISC_SVC_HANDLE;
1351 >                                 recv_handle               : PISC_SVC_HANDLE;
1352 >                                 isc_arg4                  : UShort;
1353 >                                 isc_arg5                  : PChar;
1354 >                                 isc_arg6                  : UShort;
1355 >                                 isc_arg7                  : PChar;
1356 >                                 isc_arg8                  : UShort;
1357 >                                 isc_arg9                  : PChar): ISC_STATUS;
1358 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1359 >
1360 > Tisc_service_start = function  (status_vector             : PISC_STATUS;
1361 >                                service_handle            : PISC_SVC_HANDLE;
1362 >                                recv_handle               : PISC_SVC_HANDLE;
1363 >                                isc_arg4                  : UShort;
1364 >                                isc_arg5                  : PChar): ISC_STATUS;
1365 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1366 >
1367 > (*********************************)
1368 > (** Forms functions             **)
1369 > (*********************************)
1370 >
1371 > Tisc_compile_map = function     (status_vector             : PISC_STATUS;
1372 >                                 form_handle               : PISC_FORM_HANDLE;
1373 >                                 request_handle            : PISC_REQ_HANDLE;
1374 >                                 isc_arg4                  : PShort;
1375 >                                 isc_arg5                  : PChar): ISC_STATUS;
1376 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1377 >
1378 > Tisc_compile_menu = function    (status_vector             : PISC_STATUS;
1379 >                                 form_handle               : PISC_FORM_HANDLE;
1380 >                                 request_handle            : PISC_REQ_HANDLE;
1381 >                                 isc_arg4                  : PShort;
1382 >                                 isc_arg5                  : PChar): ISC_STATUS;
1383 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1384 >
1385 > Tisc_compile_sub_map = function (status_vector             : PISC_STATUS;
1386 >                                 win_handle                : PISC_WIN_HANDLE;
1387 >                                 request_handle            : PISC_REQ_HANDLE;
1388 >                                 isc_arg4                  : PShort;
1389 >                                 isc_arg5                  : PChar): ISC_STATUS;
1390 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1391 >
1392 > Tisc_create_window = function   (status_vector             : PISC_STATUS;
1393 >                                 win_handle                : PISC_WIN_HANDLE;
1394 >                                 isc_arg3                  : PShort;
1395 >                                 isc_arg4                  : PChar;
1396 >                                 isc_arg5                  : PShort;
1397 >                                 isc_arg6                  : PShort): ISC_STATUS;
1398 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1399 >
1400 > Tisc_delete_window = function   (status_vector             : PISC_STATUS;
1401 >                                 win_handle                : PISC_WIN_HANDLE): ISC_STATUS;
1402 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1403 >
1404 > Tisc_drive_form = function      (status_vector             : PISC_STATUS;
1405 >                                 db_handle                 : PISC_DB_HANDLE;
1406 >                                 tran_handle               : PISC_TR_HANDLE;
1407 >                                 win_handle                : PISC_WIN_HANDLE;
1408 >                                 request_handle            : PISC_REQ_HANDLE;
1409 >                                 isc_arg6                  : PUChar;
1410 >                                 isc_arg7                  : PUChar): ISC_STATUS;
1411 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1412 >
1413 > Tisc_drive_menu = function      (status_vector             : PISC_STATUS;
1414 >                                 win_handle                : PISC_WIN_HANDLE;
1415 >                                 request_handle            : PISC_REQ_HANDLE;
1416 >                                 isc_arg4                  : PShort;
1417 >                                 isc_arg5                  : PChar;
1418 >                                 isc_arg6                  : PShort;
1419 >                                 isc_arg7                  : PChar;
1420 >                                 isc_arg8                  : PShort;
1421 >                                 isc_arg9                  : PShort;
1422 >                                 isc_arg10                 : PChar;
1423 >                                 isc_arg11                 : PISC_LONG): ISC_STATUS;
1424 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1425 >
1426 > Tisc_form_delete = function     (status_vector             : PISC_STATUS;
1427 >                                 form_handle               : PISC_FORM_HANDLE): ISC_STATUS;
1428 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1429 >
1430 > Tisc_form_fetch = function      (status_vector             : PISC_STATUS;
1431 >                                 db_handle                 : PISC_DB_HANDLE;
1432 >                                 tran_handle               : PISC_TR_HANDLE;
1433 >                                 request_handle            : PISC_REQ_HANDLE;
1434 >                                 isc_arg5                  : PUChar): ISC_STATUS;
1435 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1436 >
1437 > Tisc_form_insert = function     (status_vector             : PISC_STATUS;
1438 >                                 db_handle                 : PISC_DB_HANDLE;
1439 >                                 tran_handle               : PISC_TR_HANDLE;
1440 >                                 request_handle            : PISC_REQ_HANDLE;
1441 >                                 isc_arg5                  : PUChar): ISC_STATUS;
1442 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1443 >
1444 > Tisc_get_entree = function      (status_vector             : PISC_STATUS;
1445 >                                 request_handle            : PISC_REQ_HANDLE;
1446 >                                 isc_arg3                  : PShort;
1447 >                                 isc_arg4                  : PChar;
1448 >                                 isc_arg5                  : PISC_LONG;
1449 >                                 isc_arg6                  : PShort): ISC_STATUS;
1450 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1451 >
1452 > Tisc_initialize_menu = function (status_vector             : PISC_STATUS;
1453 >                                 request_handle            : PISC_REQ_HANDLE): ISC_STATUS;
1454 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1455 >
1456 > Tisc_menu = function            (status_vector             : PISC_STATUS;
1457 >                                 win_handle                : PISC_WIN_HANDLE;
1458 >                                 request_handle            : PISC_REQ_HANDLE;
1459 >                                 isc_arg4                  : PShort;
1460 >                                 isc_arg5                  : PChar): ISC_STATUS;
1461 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1462 >
1463 > Tisc_load_form = function       (status_vector             : PISC_STATUS;
1464 >                                 db_handle                 : PISC_DB_HANDLE;
1465 >                                 tran_handle               : PISC_TR_HANDLE;
1466 >                                 form_handle               : PISC_FORM_HANDLE;
1467 >                                 isc_arg5                  : PShort;
1468 >                                 isc_arg6                  : PChar): ISC_STATUS;
1469 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1470 >
1471 > Tisc_pop_window = function      (status_vector             : PISC_STATUS;
1472 >                                 win_handle                : PISC_WIN_HANDLE): ISC_STATUS;
1473 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1474 >
1475 > Tisc_put_entree = function      (status_vector             : PISC_STATUS;
1476 >                                 request_handle            : PISC_REQ_HANDLE;
1477 >                                 isc_arg3                  : PShort;
1478 >                                 isc_arg4                  : PChar;
1479 >                                 isc_arg5                  : PISC_LONG): ISC_STATUS;
1480 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1481 >
1482 > Tisc_reset_form = function      (status_vector             : PISC_STATUS;
1483 >                                 request_handle            : PISC_REQ_HANDLE): ISC_STATUS;
1484 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1485 >
1486 > Tisc_suspend_window = function  (status_vector             : PISC_STATUS;
1487 >                                 win_handle                : PISC_WIN_HANDLE): ISC_STATUS;
1488 >                                {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1489 >
1490 > (** Constants!!! **)
1491 > (*****************************************************)
1492 > (** Actions to pass to the blob filter (ctl_source) **)
1493 > (*****************************************************)
1494 >
1495 > const
1496 >  isc_blob_filter_open           =          0;
1497 >  isc_blob_filter_get_segment    =          1;
1498 >  isc_blob_filter_close          =          2;
1499 >  isc_blob_filter_create         =          3;
1500 >  isc_blob_filter_put_segment    =          4;
1501 >  isc_blob_filter_alloc          =          5;
1502 >  isc_blob_filter_free           =          6;
1503 >  isc_blob_filter_seek           =          7;
1504 >
1505 > (*********************)
1506 > (** Blr definitions **)
1507 > (*********************)
1508 >
1509 >  // In pascal, how does one deal with the below "#define"?
1510 >  // blr_word(n) ((n) % 256), ((n) / 256)
1511 >  blr_text                       =         14;
1512 >  blr_text2                      =         15;
1513 >  blr_short                      =          7;
1514 >  blr_long                       =          8;
1515 >  blr_quad                       =          9;
1516 >  blr_float                      =         10;
1517 >  blr_double                     =         27;
1518 >  blr_d_float                    =         11;
1519 >  blr_timestamp                  =         35;
1520 >  blr_varying                    =         37;
1521 >  blr_varying2                   =         38;
1522 >  blr_blob                       =        261;
1523 >  blr_cstring                    =         40;
1524 >  blr_cstring2                   =         41;
1525 >  blr_blob_id                    =         45;
1526 >  blr_sql_date                   =         12;
1527 >  blr_sql_time                   =         13;
1528 >  blr_int64                      =         16;
1529 >  blr_date                       =         blr_timestamp;
1530 >
1531 >
1532 >  blr_inner                      =          0;
1533 >  blr_left                       =          1;
1534 >  blr_right                      =          2;
1535 >  blr_full                       =          3;
1536 >
1537 >  blr_gds_code                   =          0;
1538 >  blr_sql_code                   =          1;
1539 >  blr_exception                  =          2;
1540 >  blr_trigger_code               =          3;
1541 >  blr_default_code               =          4;
1542 >
1543 >  blr_version4                   =          4;
1544 >  blr_version5                   =          5;
1545 >  blr_eoc                        =         76;
1546 >  blr_end                        =         -1;
1547 >
1548 >  blr_assignment                 =          1;
1549 >  blr_begin                      =          2;
1550 >  blr_dcl_variable               =          3;
1551 >  blr_message                    =          4;
1552 >  blr_erase                      =          5;
1553 >  blr_fetch                      =          6;
1554 >  blr_for                        =          7;
1555 >  blr_if                         =          8;
1556 >  blr_loop                       =          9;
1557 >  blr_modify                     =         10;
1558 >  blr_handler                    =         11;
1559 >  blr_receive                    =         12;
1560 >  blr_select                     =         13;
1561 >  blr_send                       =         14;
1562 >  blr_store                      =         15;
1563 >  blr_label                      =         17;
1564 >  blr_leave                      =         18;
1565 >  blr_store2                     =         19;
1566 >  blr_post                       =         20;
1567 >
1568 >  blr_literal                    =         21;
1569 >  blr_dbkey                      =         22;
1570 >  blr_field                      =         23;
1571 >  blr_fid                        =         24;
1572 >  blr_parameter                  =         25;
1573 >  blr_variable                   =         26;
1574 >  blr_average                    =         27;
1575 >  blr_count                      =         28;
1576 >  blr_maximum                    =         29;
1577 >  blr_minimum                    =         30;
1578 >  blr_total                      =         31;
1579 >  blr_add                        =         34;
1580 >  blr_subtract                   =         35;
1581 >  blr_multiply                   =         36;
1582 >  blr_divide                     =         37;
1583 >  blr_negate                     =         38;
1584 >  blr_concatenate                =         39;
1585 >  blr_substring                  =         40;
1586 >  blr_parameter2                 =         41;
1587 >  blr_from                       =         42;
1588 >  blr_via                        =         43;
1589 >  blr_user_name                  =         44;
1590 >  blr_null                       =         45;
1591 >
1592 >  blr_eql                        =         47;
1593 >  blr_neq                        =         48;
1594 >  blr_gtr                        =         49;
1595 >  blr_geq                        =         50;
1596 >  blr_lss                        =         51;
1597 >  blr_leq                        =         52;
1598 >  blr_containing                 =         53;
1599 >  blr_matching                   =         54;
1600 >  blr_starting                   =         55;
1601 >  blr_between                    =         56;
1602 >  blr_or                         =         57;
1603 >  blr_and                        =         58;
1604 >  blr_not                        =         59;
1605 >  blr_any                        =         60;
1606 >  blr_missing                    =         61;
1607 >  blr_unique                     =         62;
1608 >  blr_like                       =         63;
1609 >
1610 >  blr_stream                     =         65;
1611 >  blr_set_index                  =         66;
1612 >  blr_rse                        =         67;
1613 >  blr_first                      =         68;
1614 >  blr_project                    =         69;
1615 >  blr_sort                       =         70;
1616 >  blr_boolean                    =         71;
1617 >  blr_ascending                  =         72;
1618 >  blr_descending                 =         73;
1619 >  blr_relation                   =         74;
1620 >  blr_rid                        =         75;
1621 >  blr_union                      =         76;
1622 >  blr_map                        =         77;
1623 >  blr_group_by                   =         78;
1624 >  blr_aggregate                  =         79;
1625 >  blr_join_type                  =         80;
1626 >
1627 >  blr_agg_count                  =         83;
1628 >  blr_agg_max                    =         84;
1629 >  blr_agg_min                    =         85;
1630 >  blr_agg_total                  =         86;
1631 >  blr_agg_average                =         87;
1632 >  blr_parameter3                 =         88;
1633 >  blr_run_count                  =        118;
1634 >  blr_run_max                    =         89;
1635 >  blr_run_min                    =         90;
1636 >  blr_run_total                  =         91;
1637 >  blr_run_average                =         92;
1638 >  blr_agg_count2                 =         93;
1639 >  blr_agg_count_distinct         =         94;
1640 >  blr_agg_total_distinct         =         95;
1641 >  blr_agg_average_distinct       =         96;
1642 >
1643 >  blr_function                   =        100;
1644 >  blr_gen_id                     =        101;
1645 >  blr_prot_mask                  =        102;
1646 >  blr_upcase                     =        103;
1647 >  blr_lock_state                 =        104;
1648 >  blr_value_if                   =        105;
1649 >  blr_matching2                  =        106;
1650 >  blr_index                      =        107;
1651 >  blr_ansi_like                  =        108;
1652 >  blr_bookmark                   =        109;
1653 >  blr_crack                      =        110;
1654 >  blr_force_crack                =        111;
1655 >  blr_seek                       =        112;
1656 >  blr_find                       =        113;
1657 >
1658 >  blr_continue                   =          0;
1659 >  blr_forward                    =          1;
1660 >  blr_backward                   =          2;
1661 >  blr_bof_forward                =          3;
1662 >  blr_eof_backward               =          4;
1663 >
1664 >  blr_lock_relation              =        114;
1665 >  blr_lock_record                =        115;
1666 >  blr_set_bookmark               =        116;
1667 >  blr_get_bookmark               =        117;
1668 >  blr_rs_stream                  =        119;
1669 >  blr_exec_proc                  =        120;
1670 >  blr_begin_range                =        121;
1671 >  blr_end_range                  =        122;
1672 >  blr_delete_range               =        123;
1673 >  blr_procedure                  =        124;
1674 >  blr_pid                        =        125;
1675 >  blr_exec_pid                   =        126;
1676 >  blr_singular                   =        127;
1677 >  blr_abort                      =        128;
1678 >  blr_block                      =        129;
1679 >  blr_error_handler              =        130;
1680 >  blr_cast                       =        131;
1681 >  blr_release_lock               =        132;
1682 >  blr_release_locks              =        133;
1683 >  blr_start_savepoint            =        134;
1684 >  blr_end_savepoint              =        135;
1685 >  blr_find_dbkey                 =        136;
1686 >  blr_range_relation             =        137;
1687 >  blr_delete_ranges              =        138;
1688 >
1689 >  blr_plan                       =        139;
1690 >  blr_merge                      =        140;
1691 >  blr_join                       =        141;
1692 >  blr_sequential                 =        142;
1693 >  blr_navigational               =        143;
1694 >  blr_indices                    =        144;
1695 >  blr_retrieve                   =        145;
1696 >
1697 >  blr_relation2                  =        146;
1698 >  blr_rid2                       =        147;
1699 >  blr_reset_stream               =        148;
1700 >  blr_release_bookmark           =        149;
1701 >  blr_set_generator              =        150;
1702 >  blr_ansi_any                   =        151;
1703 >  blr_exists                     =        152;
1704 >  blr_cardinality                =        153;
1705 >
1706 >  blr_record_version             =        154;          (** get tid of record **)
1707 >  blr_stall                      =        155;          (** fake server stall **)
1708 >  blr_seek_no_warn               =        156;
1709 >  blr_find_dbkey_version         =        157;
1710 >  blr_ansi_all                   =        158;
1711 >
1712 >  blr_extract                    = 159;
1713 >
1714 >  (* sub parameters for blr_extract *)
1715 >
1716 >  blr_extract_year               = 0;
1717 >  blr_extract_month              = 1;
1718 >  blr_extract_day                = 2;
1719 >  blr_extract_hour               = 3;
1720 >  blr_extract_minute             = 4;
1721 >  blr_extract_second             = 5;
1722 >  blr_extract_weekday            = 6;
1723 >  blr_extract_yearday            = 7;
1724 >
1725 >  blr_current_date               = 160;
1726 >  blr_current_timestamp          = 161;
1727 >  blr_current_time               = 162;
1728 >
1729 >  (* These verbs were added in 6.0,
1730 >  primarily to support 64-bit integers *)
1731 >
1732 >  blr_add2                  = 163;
1733 >  blr_subtract2             = 164;
1734 >  blr_multiply2             = 165;
1735 >  blr_divide2               = 166;
1736 >  blr_agg_total2            = 167;
1737 >  blr_agg_total_distinct2   = 168;
1738 >  blr_agg_average2          = 169;
1739 >  blr_agg_average_distinct2 = 170;
1740 >  blr_average2              = 171;
1741 >  blr_gen_id2               = 172;
1742 >  blr_set_generator2        = 173;
1743 >
1744 > (************************************)
1745 > (** Database parameter block stuff **)
1746 > (************************************)
1747 >
1748 >  isc_dpb_version1               =          1;
1749 >  isc_dpb_cdd_pathname           =          1;
1750 >  isc_dpb_allocation             =          2;
1751 >  isc_dpb_journal                =          3;
1752 >  isc_dpb_page_size              =          4;
1753 >  isc_dpb_num_buffers            =          5;
1754 >  isc_dpb_buffer_length          =          6;
1755 >  isc_dpb_debug                  =          7;
1756 >  isc_dpb_garbage_collect        =          8;
1757 >  isc_dpb_verify                 =          9;
1758 >  isc_dpb_sweep                  =         10;
1759 >  isc_dpb_enable_journal         =         11;
1760 >  isc_dpb_disable_journal        =         12;
1761 >  isc_dpb_dbkey_scope            =         13;
1762 >  isc_dpb_number_of_users        =         14;
1763 >  isc_dpb_trace                  =         15;
1764 >  isc_dpb_no_garbage_collect     =         16;
1765 >  isc_dpb_damaged                =         17;
1766 >  isc_dpb_license                =         18;
1767 >  isc_dpb_sys_user_name          =         19;
1768 >  isc_dpb_encrypt_key            =         20;
1769 >  isc_dpb_activate_shadow        =         21;
1770 >  isc_dpb_sweep_interval         =         22;
1771 >  isc_dpb_delete_shadow          =         23;
1772 >  isc_dpb_force_write            =         24;
1773 >  isc_dpb_begin_log              =         25;
1774 >  isc_dpb_quit_log               =         26;
1775 >  isc_dpb_no_reserve             =         27;
1776 >  isc_dpb_user_name              =         28;
1777 >  isc_dpb_password               =         29;
1778 >  isc_dpb_password_enc           =         30;
1779 >  isc_dpb_sys_user_name_enc      =         31;
1780 >  isc_dpb_interp                 =         32;
1781 >  isc_dpb_online_dump            =         33;
1782 >  isc_dpb_old_file_size          =         34;
1783 >  isc_dpb_old_num_files          =         35;
1784 >  isc_dpb_old_file               =         36;
1785 >  isc_dpb_old_start_page         =         37;
1786 >  isc_dpb_old_start_seqno        =         38;
1787 >  isc_dpb_old_start_file         =         39;
1788 >  isc_dpb_drop_walfile           =         40;
1789 >  isc_dpb_old_dump_id            =         41;
1790 >  isc_dpb_wal_backup_dir         =         42;
1791 >  isc_dpb_wal_chkptlen           =         43;
1792 >  isc_dpb_wal_numbufs            =         44;
1793 >  isc_dpb_wal_bufsize            =         45;
1794 >  isc_dpb_wal_grp_cmt_wait       =         46;
1795 >  isc_dpb_lc_messages            =         47;
1796 >  isc_dpb_lc_ctype               =         48;
1797 >  isc_dpb_cache_manager          =         49;
1798 >  isc_dpb_shutdown               =         50;
1799 >  isc_dpb_online                 =         51;
1800 >  isc_dpb_shutdown_delay         =         52;
1801 >  isc_dpb_reserved               =         53;
1802 >  isc_dpb_overwrite              =         54;
1803 >  isc_dpb_sec_attach             =         55;
1804 >  isc_dpb_disable_wal            =         56;
1805 >  isc_dpb_connect_timeout        =         57;
1806 >  isc_dpb_dummy_packet_interval  =         58;
1807 >  isc_dpb_gbak_attach            =         59;
1808 >  isc_dpb_sql_role_name          =         60;
1809 >  isc_dpb_set_page_buffers       =         61;
1810 >  isc_dpb_working_directory      =         62;
1811 >  isc_dpb_SQL_dialect            =         63;
1812 >  isc_dpb_set_db_readonly        =         64;
1813 >  isc_dpb_set_db_SQL_dialect     =         65;
1814 >  isc_dpb_gfix_attach            =         66;
1815 >  isc_dpb_gstat_attach           =         67;
1816 >  isc_dpb_last_dpb_constant      =         isc_dpb_gstat_attach;
1817 >
1818 >
1819 > (***********************************)
1820 > (** isc_dpb_verify specific flags **)
1821 > (***********************************)
1822 >
1823 >  isc_dpb_pages                  =          1;
1824 >  isc_dpb_records                =          2;
1825 >  isc_dpb_indices                =          4;
1826 >  isc_dpb_transactions           =          8;
1827 >  isc_dpb_no_update              =         16;
1828 >  isc_dpb_repair                 =         32;
1829 >  isc_dpb_ignore                 =         64;
1830 >
1831 > (*************************************)
1832 > (** isc_dpb_shutdown specific flags **)
1833 > (*************************************)
1834 >
1835 >  isc_dpb_shut_cache             =          1;
1836 >  isc_dpb_shut_attachment        =          2;
1837 >  isc_dpb_shut_transaction       =          4;
1838 >  isc_dpb_shut_force             =          8;
1839 >
1840 > (****************************************)
1841 > (** Bit assignments in RDB$SYSTEM_FLAG **)
1842 > (****************************************)
1843 >
1844 >  RDB_system                     =          1;
1845 >  RDB_id_assigned                =          2;
1846 >
1847 >
1848 > (***************************************)
1849 > (** Transaction parameter block stuff **)
1850 > (***************************************)
1851 >
1852 >  isc_tpb_version1               =          1;
1853 >  isc_tpb_version3               =          3;
1854 >  isc_tpb_consistency            =          1;
1855 >  isc_tpb_concurrency            =          2;
1856 >  isc_tpb_shared                 =          3;
1857 >  isc_tpb_protected              =          4;
1858 >  isc_tpb_exclusive              =          5;
1859 >  isc_tpb_wait                   =          6;
1860 >  isc_tpb_nowait                 =          7;
1861 >  isc_tpb_read                   =          8;
1862 >  isc_tpb_write                  =          9;
1863 >  isc_tpb_lock_read              =         10;
1864 >  isc_tpb_lock_write             =         11;
1865 >  isc_tpb_verb_time              =         12;
1866 >  isc_tpb_commit_time            =         13;
1867 >  isc_tpb_ignore_limbo           =         14;
1868 >  isc_tpb_read_committed         =         15;
1869 >  isc_tpb_autocommit             =         16;
1870 >  isc_tpb_rec_version            =         17;
1871 >  isc_tpb_no_rec_version         =         18;
1872 >  isc_tpb_restart_requests       =         19;
1873 >  isc_tpb_no_auto_undo           =         20;
1874 >  isc_tpb_last_tpb_constant      =         isc_tpb_no_auto_undo;
1875 >
1876 >
1877 > (**************************)
1878 > (** Blob Parameter Block **)
1879 > (**************************)
1880 >
1881 >  isc_bpb_version1               =          1;
1882 >  isc_bpb_source_type            =          1;
1883 >  isc_bpb_target_type            =          2;
1884 >  isc_bpb_type                   =          3;
1885 >  isc_bpb_source_interp          =          4;
1886 >  isc_bpb_target_interp          =          5;
1887 >  isc_bpb_filter_parameter       =          6;
1888 >
1889 >  isc_bpb_type_segmented         =          0;
1890 >  isc_bpb_type_stream            =          1;
1891 >
1892 >
1893 > (***********************************)
1894 > (** Service parameter block stuff **)
1895 > (***********************************)
1896 >
1897 >  isc_spb_user_name              =          1;
1898 >  isc_spb_sys_user_name          =          2;
1899 >  isc_spb_sys_user_name_enc      =          3;
1900 >  isc_spb_password               =          4;
1901 >  isc_spb_password_enc           =          5;
1902 >  isc_spb_command_line           =          6;
1903 >  isc_spb_dbname                 =          7;
1904 >  isc_spb_verbose                =          8;
1905 >  isc_spb_options                =          9;
1906 >  isc_spb_connect_timeout        =          10;
1907 >  isc_spb_dummy_packet_interval  =          11;
1908 >  isc_spb_sql_role_name          =          12;
1909 >  isc_spb_last_spb_constant      =          isc_spb_sql_role_name;
1910 >
1911 >  isc_spb_version1                                = 1;
1912 >  isc_spb_current_version                         = 2;
1913 >  isc_spb_version                                 = isc_spb_current_version;
1914 >  isc_spb_user_name_mapped_to_server              = isc_dpb_user_name;
1915 >  isc_spb_sys_user_name_mapped_to_server          = isc_dpb_sys_user_name;
1916 >  isc_spb_sys_user_name_enc_mapped_to_server      = isc_dpb_sys_user_name_enc;
1917 >  isc_spb_password_mapped_to_server               = isc_dpb_password;
1918 >  isc_spb_password_enc_mapped_to_server           = isc_dpb_password_enc;
1919 >  isc_spb_command_line_mapped_to_server           = 105;
1920 >  isc_spb_dbname_mapped_to_server                 = 106;
1921 >  isc_spb_verbose_mapped_to_server                = 107;
1922 >  isc_spb_options_mapped_to_server                = 108;
1923 >  isc_spb_connect_timeout_mapped_to_server        = isc_dpb_connect_timeout;
1924 >  isc_spb_dummy_packet_interval_mapped_to_server  = isc_dpb_dummy_packet_interval;
1925 >  isc_spb_sql_role_name_mapped_to_server          = isc_dpb_sql_role_name;
1926 >
1927 > (***********************************)
1928 > (** Information call declarations **)
1929 > (***********************************)
1930 >
1931 > (******************************)
1932 > (** Common, structural codes **)
1933 > (******************************)
1934 >
1935 >  isc_info_end                   =          1;
1936 >  isc_info_truncated             =          2;
1937 >  isc_info_error                 =          3;
1938 >  isc_info_data_not_ready        =          4;
1939 >  isc_info_flag_end              =          127;
1940 >
1941 > (********************************)
1942 > (** Database information items **)
1943 > (********************************)
1944 >
1945 >  isc_info_db_id                 =          4;
1946 >  isc_info_reads                 =          5;
1947 >  isc_info_writes                =          6;
1948 >  isc_info_fetches               =          7;
1949 >  isc_info_marks                 =          8;
1950 >  isc_info_implementation        =         11;
1951 >  isc_info_version               =         12;
1952 >  isc_info_base_level            =         13;
1953 >  isc_info_page_size             =         14;
1954 >  isc_info_num_buffers           =         15;
1955 >  isc_info_limbo                 =         16;
1956 >  isc_info_current_memory        =         17;
1957 >  isc_info_max_memory            =         18;
1958 >  isc_info_window_turns          =         19;
1959 >  isc_info_license               =         20;
1960 >  isc_info_allocation            =         21;
1961 >  isc_info_attachment_id         =         22;
1962 >  isc_info_read_seq_count        =         23;
1963 >  isc_info_read_idx_count        =         24;
1964 >  isc_info_insert_count          =         25;
1965 >  isc_info_update_count          =         26;
1966 >  isc_info_delete_count          =         27;
1967 >  isc_info_backout_count         =         28;
1968 >  isc_info_purge_count           =         29;
1969 >  isc_info_expunge_count         =         30;
1970 >  isc_info_sweep_interval        =         31;
1971 >  isc_info_ods_version           =         32;
1972 >  isc_info_ods_minor_version     =         33;
1973 >  isc_info_no_reserve            =         34;
1974 >  isc_info_logfile               =         35;
1975 >  isc_info_cur_logfile_name      =         36;
1976 >  isc_info_cur_log_part_offset   =         37;
1977 >  isc_info_num_wal_buffers       =         38;
1978 >  isc_info_wal_buffer_size       =         39;
1979 >  isc_info_wal_ckpt_length       =         40;
1980 >  isc_info_wal_cur_ckpt_interval =         41;
1981 >  isc_info_wal_prv_ckpt_fname    =         42;
1982 >  isc_info_wal_prv_ckpt_poffset  =         43;
1983 >  isc_info_wal_recv_ckpt_fname   =         44;
1984 >  isc_info_wal_recv_ckpt_poffset =         45;
1985 >  isc_info_wal_grpc_wait_usecs   =         47;
1986 >  isc_info_wal_num_io            =         48;
1987 >  isc_info_wal_avg_io_size       =         49;
1988 >  isc_info_wal_num_commits       =         50;
1989 >  isc_info_wal_avg_grpc_size     =         51;
1990 >  isc_info_forced_writes         =         52;
1991 >  isc_info_user_names            =         53;
1992 >  isc_info_page_errors           =         54;
1993 >  isc_info_record_errors         =         55;
1994 >  isc_info_bpage_errors          =         56;
1995 >  isc_info_dpage_errors          =         57;
1996 >  isc_info_ipage_errors          =         58;
1997 >  isc_info_ppage_errors          =         59;
1998 >  isc_info_tpage_errors          =         60;
1999 >  isc_info_set_page_buffers      =         61;
2000 >  isc_info_db_SQL_dialect        =         62;
2001 >  isc_info_db_read_only          =         63;
2002 >  isc_info_db_size_in_pages      =         64;
2003 >
2004 > (****************************************)
2005 > (** Database information return values **)
2006 > (****************************************)
2007 >
2008 >  isc_info_db_impl_rdb_vms       =          1;
2009 >  isc_info_db_impl_rdb_eln       =          2;
2010 >  isc_info_db_impl_rdb_eln_dev   =          3;
2011 >  isc_info_db_impl_rdb_vms_y     =          4;
2012 >  isc_info_db_impl_rdb_eln_y     =          5;
2013 >  isc_info_db_impl_jri           =          6;
2014 >  isc_info_db_impl_jsv           =          7;
2015 >  isc_info_db_impl_isc_a         =         25;
2016 >  isc_info_db_impl_isc_u         =         26;
2017 >  isc_info_db_impl_isc_v         =         27;
2018 >  isc_info_db_impl_isc_s         =         28;
2019 >  isc_info_db_impl_isc_apl_68K   =         25;
2020 >  isc_info_db_impl_isc_vax_ultr  =         26;
2021 >  isc_info_db_impl_isc_vms       =         27;
2022 >  isc_info_db_impl_isc_sun_68k   =         28;
2023 >  isc_info_db_impl_isc_os2       =         29;
2024 >  isc_info_db_impl_isc_sun4      =         30;
2025 >  isc_info_db_impl_isc_hp_ux     =         31;
2026 >  isc_info_db_impl_isc_sun_386i  =         32;
2027 >  isc_info_db_impl_isc_vms_orcl  =         33;
2028 >  isc_info_db_impl_isc_mac_aux   =         34;
2029 >  isc_info_db_impl_isc_rt_aix    =         35;
2030 >  isc_info_db_impl_isc_mips_ult  =         36;
2031 >  isc_info_db_impl_isc_xenix     =         37;
2032 >  isc_info_db_impl_isc_dg        =         38;
2033 >  isc_info_db_impl_isc_hp_mpexl  =         39;
2034 >  isc_info_db_impl_isc_hp_ux68K  =         40;
2035 >  isc_info_db_impl_isc_sgi       =         41;
2036 >  isc_info_db_impl_isc_sco_unix  =         42;
2037 >  isc_info_db_impl_isc_cray      =         43;
2038 >  isc_info_db_impl_isc_imp       =         44;
2039 >  isc_info_db_impl_isc_delta     =         45;
2040 >  isc_info_db_impl_isc_next      =         46;
2041 >  isc_info_db_impl_isc_dos       =         47;
2042 >  isc_info_db_impl_isc_winnt     =         48;
2043 >  isc_info_db_impl_isc_epson     =         49;
2044 >
2045 >  isc_info_db_class_access       =          1;
2046 >  isc_info_db_class_y_valve      =          2;
2047 >  isc_info_db_class_rem_int      =          3;
2048 >  isc_info_db_class_rem_srvr     =          4;
2049 >  isc_info_db_class_pipe_int     =          7;
2050 >  isc_info_db_class_pipe_srvr    =          8;
2051 >  isc_info_db_class_sam_int      =          9;
2052 >  isc_info_db_class_sam_srvr     =         10;
2053 >  isc_info_db_class_gateway      =         11;
2054 >  isc_info_db_class_cache        =         12;
2055 >
2056 > (*******************************)
2057 > (** Request information items **)
2058 > (*******************************)
2059 >
2060 >  isc_info_number_messages       =          4;
2061 >  isc_info_max_message           =          5;
2062 >  isc_info_max_send              =          6;
2063 >  isc_info_max_receive           =          7;
2064 >  isc_info_state                 =          8;
2065 >  isc_info_message_number        =          9;
2066 >  isc_info_message_size          =         10;
2067 >  isc_info_request_cost          =         11;
2068 >  isc_info_access_path           =         12;
2069 >  isc_info_req_select_count      =         13;
2070 >  isc_info_req_insert_count      =         14;
2071 >  isc_info_req_update_count      =         15;
2072 >  isc_info_req_delete_count      =         16;
2073 >
2074 >
2075 > (***********************)
2076 > (** Access path items **)
2077 > (***********************)
2078 >
2079 >  isc_info_rsb_end               =          0;
2080 >  isc_info_rsb_begin             =          1;
2081 >  isc_info_rsb_type              =          2;
2082 >  isc_info_rsb_relation          =          3;
2083 >  isc_info_rsb_plan              =          4;
2084 >
2085 > (***************)
2086 > (** Rsb types **)
2087 > (***************)
2088 >
2089 >  isc_info_rsb_unknown           =          1;
2090 >  isc_info_rsb_indexed           =          2;
2091 >  isc_info_rsb_navigate          =          3;
2092 >  isc_info_rsb_sequential        =          4;
2093 >  isc_info_rsb_cross             =          5;
2094 >  isc_info_rsb_sort              =          6;
2095 >  isc_info_rsb_first             =          7;
2096 >  isc_info_rsb_boolean           =          8;
2097 >  isc_info_rsb_union             =          9;
2098 >  isc_info_rsb_aggregate         =         10;
2099 >  isc_info_rsb_merge             =         11;
2100 >  isc_info_rsb_ext_sequential    =         12;
2101 >  isc_info_rsb_ext_indexed       =         13;
2102 >  isc_info_rsb_ext_dbkey         =         14;
2103 >  isc_info_rsb_left_cross        =         15;
2104 >  isc_info_rsb_select            =         16;
2105 >  isc_info_rsb_sql_join          =         17;
2106 >  isc_info_rsb_simulate          =         18;
2107 >  isc_info_rsb_sim_cross         =         19;
2108 >  isc_info_rsb_once              =         20;
2109 >  isc_info_rsb_procedure         =         21;
2110 >
2111 > (************************)
2112 > (** Bitmap expressions **)
2113 > (************************)
2114 >
2115 >  isc_info_rsb_and               =          1;
2116 >  isc_info_rsb_or                =          2;
2117 >  isc_info_rsb_dbkey             =          3;
2118 >  isc_info_rsb_index             =          4;
2119 >
2120 >  isc_info_req_active            =          2;
2121 >  isc_info_req_inactive          =          3;
2122 >  isc_info_req_send              =          4;
2123 >  isc_info_req_receive           =          5;
2124 >  isc_info_req_select            =          6;
2125 >  isc_info_req_sql_stall         =          7;
2126 >
2127 > (****************************)
2128 > (** Blob information items **)
2129 > (****************************)
2130 >
2131 >  isc_info_blob_num_segments     =          4;
2132 >  isc_info_blob_max_segment      =          5;
2133 >  isc_info_blob_total_length     =          6;
2134 >  isc_info_blob_type             =          7;
2135 >
2136 > (***********************************)
2137 > (** Transaction information items **)
2138 > (***********************************)
2139 >
2140 >  isc_info_tra_id                =          4;
2141 >
2142 > (*******************************)
2143 > (** Service information items **)
2144 > (*******************************)
2145 >
2146 > {$IFDEF IB5_ONLY }
2147 > (*  This defines are not there in version 6.0 *)
2148 > {  isc_info_svc_version           =          4;
2149 >  isc_info_svc_message           =          5;
2150 >  isc_info_svc_total_length      =          6;
2151 >  isc_info_svc_response          =          7;
2152 >  isc_info_svc_response_more     =          8;
2153 >  isc_info_svc_line              =          9;
2154 >  isc_info_svc_to_eof            =         10;
2155 >  isc_info_svc_timeout           =         11;
2156 >  isc_info_svc_server_version    =         12;
2157 >  isc_info_svc_implementation    =         13;
2158 >  isc_info_svc_capabilities      =         14;
2159 >  isc_info_svc_user_dbpath       =         15;
2160 >  isc_info_svc_svr_db_info       =         16;
2161 >  isc_info_svc_svr_online        =         17;
2162 >  isc_info_svc_svr_offline       =         18;
2163 >  isc_info_svc_get_config        =         19;
2164 >  isc_info_svc_set_config        =         20;
2165 >  isc_info_svc_default_config    =         21;
2166 >  isc_info_svc_get_env           =         22;
2167 >  isc_info_svc_get_env_lock      =         23;
2168 >  isc_info_svc_get_env_msg       =         24; }
2169 > {$ENDIF}
2170 >
2171 > (*****************************************)
2172 > (* Service action items                 **)
2173 > (*****************************************)
2174 >
2175 >  isc_action_svc_backup         = 1; (* Starts database backup process on the server *)
2176 >  isc_action_svc_restore        = 2; (* Starts database restore process on the server *)
2177 >  isc_action_svc_repair         = 3; (* Starts database repair process on the server *)
2178 >  isc_action_svc_add_user       = 4; (* Adds a new user to the security database *)
2179 >  isc_action_svc_delete_user    = 5; (* Deletes a user record from the security database *)
2180 >  isc_action_svc_modify_user    = 6; (* Modifies a user record in the security database *)
2181 >  isc_action_svc_display_user   = 7; (* Displays a user record from the security database *)
2182 >  isc_action_svc_properties     = 8; (* Sets database properties *)
2183 >  isc_action_svc_add_license    = 9; (* Adds a license to the license file *)
2184 >  isc_action_svc_remove_license = 10; (* Removes a license from the license file *)
2185 >  isc_action_svc_db_stats       = 11; (* Retrieves database statistics *)
2186 >  isc_action_svc_get_ib_log     = 12; (* Retrieves the InterBase log file from the server *)
2187 >
2188 > (*****************************************)
2189 > (** Service information items           **)
2190 > (*****************************************)
2191 >
2192 >  isc_info_svc_svr_db_info      = 50; (* Retrieves the number of attachments and databases *)
2193 >  isc_info_svc_get_license      = 51; (* Retrieves all license keys and IDs from the license file *)
2194 >  isc_info_svc_get_license_mask = 52; (* Retrieves a bitmask representing licensed options on the server *)
2195 >  isc_info_svc_get_config       = 53; (* Retrieves the parameters and values for IB_CONFIG *)
2196 >  isc_info_svc_version          = 54; (* Retrieves the version of the services manager *)
2197 >  isc_info_svc_server_version   = 55;(* Retrieves the version of the InterBase server *)
2198 >  isc_info_svc_implementation   = 56; (* Retrieves the implementation of the InterBase server *)
2199 >  isc_info_svc_capabilities     = 57; (* Retrieves a bitmask representing the server's capabilities *)
2200 >  isc_info_svc_user_dbpath      = 58; (* Retrieves the path to the security database in use by the server *)
2201 >  isc_info_svc_get_env          = 59; (* Retrieves the setting of $INTERBASE *)
2202 >  isc_info_svc_get_env_lock     = 60; (* Retrieves the setting of $INTERBASE_LCK *)
2203 >  isc_info_svc_get_env_msg      = 61; (* Retrieves the setting of $INTERBASE_MSG *)
2204 >  isc_info_svc_line             = 62; (* Retrieves 1 line of service output per call *)
2205 >  isc_info_svc_to_eof           = 63; (* Retrieves as much of the server output as will fit in the supplied buffer *)
2206 >  isc_info_svc_timeout          = 64; (* Sets / signifies a timeout value for reading service information *)
2207 >  isc_info_svc_get_licensed_users = 65; (* Retrieves the number of users licensed for accessing the server *)
2208 >  isc_info_svc_limbo_trans      = 66; (* Retrieve the limbo transactions *)
2209 >  isc_info_svc_running          = 67; (* Checks to see if a service is running on an attachment *)
2210 >  isc_info_svc_get_users        = 68; (* Returns the user information from isc_action_svc_display_users *)
2211 >
2212 > (*****************************************)
2213 > (* Parameters for isc_action_{add|delete|modify)_user *)
2214 > (*****************************************)
2215 >
2216 >  isc_spb_sec_userid            = 5;
2217 >  isc_spb_sec_groupid           = 6;
2218 >  isc_spb_sec_username          = 7;
2219 >  isc_spb_sec_password          = 8;
2220 >  isc_spb_sec_groupname         = 9;
2221 >  isc_spb_sec_firstname         = 10;
2222 >  isc_spb_sec_middlename        = 11;
2223 >  isc_spb_sec_lastname          = 12;
2224 >
2225 > (*****************************************)
2226 > (* Parameters for isc_action_svc_(add|remove)_license, *)
2227 > (* isc_info_svc_get_license                            *)
2228 > (*****************************************)
2229 >
2230 >  isc_spb_lic_key               = 5;
2231 >  isc_spb_lic_id                = 6;
2232 >  isc_spb_lic_desc              = 7;
2233 >
2234 >
2235 > (*****************************************)
2236 > (* Parameters for isc_action_svc_backup  *)
2237 > (*****************************************)
2238 >
2239 >  isc_spb_bkp_file               = 5;
2240 >  isc_spb_bkp_factor             = 6;
2241 >  isc_spb_bkp_length             = 7;
2242 >  isc_spb_bkp_ignore_checksums   = $01;
2243 >  isc_spb_bkp_ignore_limbo       = $02;
2244 >  isc_spb_bkp_metadata_only      = $04;
2245 >  isc_spb_bkp_no_garbage_collect = $08;
2246 >  isc_spb_bkp_old_descriptions   = $10;
2247 >  isc_spb_bkp_non_transportable  = $20;
2248 >  isc_spb_bkp_convert            = $40;
2249 >  isc_spb_bkp_expand             = $80;
2250 >
2251 > (*****************************************)
2252 > (* Parameters for isc_action_svc_properties *)
2253 > (*****************************************)
2254 >
2255 >  isc_spb_prp_page_buffers            = 5;
2256 >  isc_spb_prp_sweep_interval          = 6;
2257 >  isc_spb_prp_shutdown_db             = 7;
2258 >  isc_spb_prp_deny_new_attachments    = 9;
2259 >  isc_spb_prp_deny_new_transactions   = 10;
2260 >  isc_spb_prp_reserve_space           = 11;
2261 >  isc_spb_prp_write_mode              = 12;
2262 >  isc_spb_prp_access_mode             = 13;
2263 >  isc_spb_prp_set_sql_dialect         = 14;
2264 >  isc_spb_prp_activate                = $0100;
2265 >  isc_spb_prp_db_online               = $0200;
2266 >
2267 > (*****************************************)
2268 > (* Parameters for isc_spb_prp_reserve_space *)
2269 > (*****************************************)
2270 >
2271 >  isc_spb_prp_res_use_full            = 35;
2272 >  isc_spb_prp_res                     = 36;
2273 >
2274 > (*****************************************)
2275 > (* Parameters for isc_spb_prp_write_mode  *)
2276 > (*****************************************)
2277 >
2278 >  isc_spb_prp_wm_async          = 37;
2279 >  isc_spb_prp_wm_sync           = 38;
2280 >
2281 > (*****************************************)
2282 > (* Parameters for isc_spb_prp_access_mode *)
2283 > (*****************************************)
2284 >
2285 >  isc_spb_prp_am_readonly       = 39;
2286 >  isc_spb_prp_am_readwrite      = 40;
2287 >
2288 > (*****************************************)
2289 > (* Parameters for isc_action_svc_repair  *)
2290 > (*****************************************)
2291 >
2292 >  isc_spb_rpr_commit_trans             = 15;
2293 >  isc_spb_rpr_rollback_trans           = 34;
2294 >  isc_spb_rpr_recover_two_phase        = 17;
2295 >  isc_spb_tra_id                       = 18;
2296 >  isc_spb_single_tra_id                = 19;
2297 >  isc_spb_multi_tra_id                 = 20;
2298 >  isc_spb_tra_state                    = 21;
2299 >  isc_spb_tra_state_limbo              = 22;
2300 >  isc_spb_tra_state_commit             = 23;
2301 >  isc_spb_tra_state_rollback           = 24;
2302 >  isc_spb_tra_state_unknown            = 25;
2303 >  isc_spb_tra_host_site                = 26;
2304 >  isc_spb_tra_remote_site              = 27;
2305 >  isc_spb_tra_db_path                  = 28;
2306 >  isc_spb_tra_advise                   = 29;
2307 >  isc_spb_tra_advise_commit            = 30;
2308 >  isc_spb_tra_advise_rollback          = 31;
2309 >  isc_spb_tra_advise_unknown           = 33;
2310 >  isc_spb_rpr_validate_db              = $01;
2311 >  isc_spb_rpr_sweep_db                 = $02;
2312 >  isc_spb_rpr_mend_db                  = $04;
2313 >  isc_spb_rpr_list_limbo_trans         = $08;
2314 >  isc_spb_rpr_check_db                 = $10;
2315 >  isc_spb_rpr_ignore_checksum          = $20;
2316 >  isc_spb_rpr_kill_shadows             = $40;
2317 >  isc_spb_rpr_full                     = $80;
2318 >
2319 > (*****************************************)
2320 > (* Parameters for isc_action_svc_restore  *)
2321 > (*****************************************)
2322 >
2323 >  isc_spb_res_buffers                  = 9;
2324 >  isc_spb_res_page_size                = 10;
2325 >  isc_spb_res_length                   = 11;
2326 >  isc_spb_res_access_mode              = 12;
2327 >  isc_spb_res_deactivate_idx           = $0100;
2328 >  isc_spb_res_no_shadow                = $0200;
2329 >  isc_spb_res_no_validity              = $0400;
2330 >  isc_spb_res_one_at_a_time            = $0800;
2331 >  isc_spb_res_replace                  = $1000;
2332 >  isc_spb_res_create                   = $2000;
2333 >  isc_spb_res_use_all_space            = $4000;
2334 >
2335 > (*****************************************)
2336 > (* Parameters for isc_spb_res_access_mode  *)
2337 > (*****************************************)
2338 >
2339 >  isc_spb_res_am_readonly               = isc_spb_prp_am_readonly;
2340 >  isc_spb_res_am_readwrite              = isc_spb_prp_am_readwrite;
2341 >
2342 > (*****************************************)
2343 > (* Parameters for isc_info_svc_svr_db_info *)
2344 > (*****************************************)
2345 >
2346 >  isc_spb_num_att               = 5;
2347 >  isc_spb_num_db                = 6;
2348 >
2349 > (*****************************************)
2350 > (* Parameters for isc_info_svc_db_stats  *)
2351 > (*****************************************)
2352 >
2353 >  isc_spb_sts_data_pages        = $01;
2354 >  isc_spb_sts_db_log            = $02;
2355 >  isc_spb_sts_hdr_pages         = $04;
2356 >  isc_spb_sts_idx_pages         = $08;
2357 >  isc_spb_sts_sys_relations     = $10;
2358 >
2359 >
2360 > (***************************)
2361 > (** SQL information items **)
2362 > (***************************)
2363 >
2364 >  isc_info_sql_select            =          4;
2365 >  isc_info_sql_bind              =          5;
2366 >  isc_info_sql_num_variables     =          6;
2367 >  isc_info_sql_describe_vars     =          7;
2368 >  isc_info_sql_describe_end      =          8;
2369 >  isc_info_sql_sqlda_seq         =          9;
2370 >  isc_info_sql_message_seq       =         10;
2371 >  isc_info_sql_type              =         11;
2372 >  isc_info_sql_sub_type          =         12;
2373 >  isc_info_sql_scale             =         13;
2374 >  isc_info_sql_length            =         14;
2375 >  isc_info_sql_null_ind          =         15;
2376 >  isc_info_sql_field             =         16;
2377 >  isc_info_sql_relation          =         17;
2378 >  isc_info_sql_owner             =         18;
2379 >  isc_info_sql_alias             =         19;
2380 >  isc_info_sql_sqlda_start       =         20;
2381 >  isc_info_sql_stmt_type         =         21;
2382 >  isc_info_sql_get_plan          =         22;
2383 >  isc_info_sql_records           =         23;
2384 >  isc_info_sql_batch_fetch       =         24;
2385 >
2386 > (***********************************)
2387 > (** SQL information return values **)
2388 > (***********************************)
2389 >
2390 >  isc_info_sql_stmt_select           =          1;
2391 >  isc_info_sql_stmt_insert           =          2;
2392 >  isc_info_sql_stmt_update           =          3;
2393 >  isc_info_sql_stmt_delete           =          4;
2394 >  isc_info_sql_stmt_ddl              =          5;
2395 >  isc_info_sql_stmt_get_segment      =          6;
2396 >  isc_info_sql_stmt_put_segment      =          7;
2397 >  isc_info_sql_stmt_exec_procedure   =          8;
2398 >  isc_info_sql_stmt_start_trans      =          9;
2399 >  isc_info_sql_stmt_commit           =         10;
2400 >  isc_info_sql_stmt_rollback         =         11;
2401 >  isc_info_sql_stmt_select_for_upd   =         12;
2402 >  isc_info_sql_stmt_set_generator    =         13;
2403 >
2404 >
2405 > (*************************************)
2406 > (** Server configuration key values **)
2407 > (*************************************)
2408 >
2409 >  ISCCFG_LOCKMEM_KEY             =          0;
2410 >  ISCCFG_LOCKSEM_KEY             =          1;
2411 >  ISCCFG_LOCKSIG_KEY             =          2;
2412 >  ISCCFG_EVNTMEM_KEY             =          3;
2413 >  ISCCFG_DBCACHE_KEY             =          4;
2414 >  ISCCFG_PRIORITY_KEY            =          5;
2415 >  ISCCFG_IPCMAP_KEY              =          6;
2416 >  ISCCFG_MEMMIN_KEY              =          7;
2417 >  ISCCFG_MEMMAX_KEY              =          8;
2418 >  ISCCFG_LOCKORDER_KEY           =          9;
2419 >  ISCCFG_ANYLOCKMEM_KEY          =         10;
2420 >  ISCCFG_ANYLOCKSEM_KEY          =         11;
2421 >  ISCCFG_ANYLOCKSIG_KEY          =         12;
2422 >  ISCCFG_ANYEVNTMEM_KEY          =         13;
2423 >  ISCCFG_LOCKHASH_KEY            =         14;
2424 >  ISCCFG_DEADLOCK_KEY            =         15;
2425 >  ISCCFG_LOCKSPIN_KEY            =         16;
2426 >  ISCCFG_CONN_TIMEOUT_KEY        =         17;
2427 >  ISCCFG_DUMMY_INTRVL_KEY        =         18;
2428 >
2429 >
2430 > (*****************)
2431 > (** Error codes **)
2432 > (*****************)
2433 >
2434 >  isc_facility                   =         20;
2435 >  isc_err_base                   =  335544320;
2436 >  isc_err_factor                 =          1;
2437 >  isc_arg_end                    =          0;
2438 >  isc_arg_gds                    =          1;
2439 >  isc_arg_string                 =          2;
2440 >  isc_arg_cstring                =          3;
2441 >  isc_arg_number                 =          4;
2442 >  isc_arg_interpreted            =          5;
2443 >  isc_arg_vms                    =          6;
2444 >  isc_arg_unix                   =          7;
2445 >  isc_arg_domain                 =          8;
2446 >  isc_arg_dos                    =          9;
2447 >  isc_arg_mpexl                  =         10;
2448 >  isc_arg_mpexl_ipc              =         11;
2449 >  isc_arg_next_mach              =         15;
2450 >  isc_arg_netware                =         16;
2451 >  isc_arg_win32                  =         17;
2452 >  isc_arg_warning                =         18;
2453 >
2454 > (************************************************)
2455 > (** Dynamic Data Definition Language operators **)
2456 > (************************************************)
2457 >
2458 > (********************)
2459 > (** Version number **)
2460 > (********************)
2461 >
2462 >  isc_dyn_version_1              =          1;
2463 >  isc_dyn_eoc                    =         -1;
2464 >
2465 > (********************************)
2466 > (** Operations (may be nested) **)
2467 > (********************************)
2468 >
2469 >  isc_dyn_begin                  =          2;
2470 >  isc_dyn_end                    =          3;
2471 >  isc_dyn_if                     =          4;
2472 >  isc_dyn_def_database           =          5;
2473 >  isc_dyn_def_global_fld         =          6;
2474 >  isc_dyn_def_local_fld          =          7;
2475 >  isc_dyn_def_idx                =          8;
2476 >  isc_dyn_def_rel                =          9;
2477 >  isc_dyn_def_sql_fld            =         10;
2478 >  isc_dyn_def_view               =         12;
2479 >  isc_dyn_def_trigger            =         15;
2480 >  isc_dyn_def_security_class     =        120;
2481 >  isc_dyn_def_dimension          =        140;
2482 >  isc_dyn_def_generator          =         24;
2483 >  isc_dyn_def_function           =         25;
2484 >  isc_dyn_def_filter             =         26;
2485 >  isc_dyn_def_function_arg       =         27;
2486 >  isc_dyn_def_shadow             =         34;
2487 >  isc_dyn_def_trigger_msg        =         17;
2488 >  isc_dyn_def_file               =         36;
2489 >  isc_dyn_mod_database           =         39;
2490 >  isc_dyn_mod_rel                =         11;
2491 >  isc_dyn_mod_global_fld         =         13;
2492 >  isc_dyn_mod_idx                =        102;
2493 >  isc_dyn_mod_local_fld          =         14;
2494 >  isc_dyn_mod_sql_fld          =          216;
2495 >  isc_dyn_mod_view               =         16;
2496 >  isc_dyn_mod_security_class     =        122;
2497 >  isc_dyn_mod_trigger            =        113;
2498 >  isc_dyn_mod_trigger_msg        =         28;
2499 >  isc_dyn_delete_database        =         18;
2500 >  isc_dyn_delete_rel             =         19;
2501 >  isc_dyn_delete_global_fld      =         20;
2502 >  isc_dyn_delete_local_fld       =         21;
2503 >  isc_dyn_delete_idx             =         22;
2504 >  isc_dyn_delete_security_class  =        123;
2505 >  isc_dyn_delete_dimensions      =        143;
2506 >  isc_dyn_delete_trigger         =         23;
2507 >  isc_dyn_delete_trigger_msg     =         29;
2508 >  isc_dyn_delete_filter          =         32;
2509 >  isc_dyn_delete_function        =         33;
2510 >  isc_dyn_delete_shadow          =         35;
2511 >  isc_dyn_grant                  =         30;
2512 >  isc_dyn_revoke                 =         31;
2513 >  isc_dyn_def_primary_key        =         37;
2514 >  isc_dyn_def_foreign_key        =         38;
2515 >  isc_dyn_def_unique             =         40;
2516 >  isc_dyn_def_procedure          =        164;
2517 >  isc_dyn_delete_procedure       =        165;
2518 >  isc_dyn_def_parameter          =        135;
2519 >  isc_dyn_delete_parameter       =        136;
2520 >  isc_dyn_mod_procedure          =        175;
2521 >  isc_dyn_def_log_file           =        176;
2522 >  isc_dyn_def_cache_file         =        180;
2523 >  isc_dyn_def_exception          =        181;
2524 >  isc_dyn_mod_exception          =        182;
2525 >  isc_dyn_del_exception          =        183;
2526 >  isc_dyn_drop_log               =        194;
2527 >  isc_dyn_drop_cache             =        195;
2528 >  isc_dyn_def_default_log        =        202;
2529 >
2530 > (*************************)
2531 > (** View specific stuff **)
2532 > (*************************)
2533 >
2534 >  isc_dyn_view_blr               =         43;
2535 >  isc_dyn_view_source            =         44;
2536 >  isc_dyn_view_relation          =         45;
2537 >  isc_dyn_view_context           =         46;
2538 >  isc_dyn_view_context_name      =         47;
2539 >
2540 > (************************)
2541 > (** Generic attributes **)
2542 > (************************)
2543 >
2544 >  isc_dyn_rel_name               =         50;
2545 >  isc_dyn_fld_name               =         51;
2546 >  isc_dyn_new_fld_name           =        215;
2547 >  isc_dyn_idx_name               =         52;
2548 >  isc_dyn_description            =         53;
2549 >  isc_dyn_security_class         =         54;
2550 >  isc_dyn_system_flag            =         55;
2551 >  isc_dyn_update_flag            =         56;
2552 >  isc_dyn_prc_name               =        166;
2553 >  isc_dyn_prm_name               =        137;
2554 >  isc_dyn_sql_object             =        196;
2555 >  isc_dyn_fld_character_set_name =        174;
2556 >
2557 > (**********************************)
2558 > (** Relation specific attributes **)
2559 > (**********************************)
2560 >
2561 >  isc_dyn_rel_dbkey_length       =         61;
2562 >  isc_dyn_rel_store_trig         =         62;
2563 >  isc_dyn_rel_modify_trig        =         63;
2564 >  isc_dyn_rel_erase_trig         =         64;
2565 >  isc_dyn_rel_store_trig_source  =         65;
2566 >  isc_dyn_rel_modify_trig_source =         66;
2567 >  isc_dyn_rel_erase_trig_source  =         67;
2568 >  isc_dyn_rel_ext_file           =         68;
2569 >  isc_dyn_rel_sql_protection     =         69;
2570 >  isc_dyn_rel_constraint         =        162;
2571 >  isc_dyn_delete_rel_constraint  =        163;
2572 >
2573 > (**************************************)
2574 > (** Global field specific attributes **)
2575 > (**************************************)
2576 >
2577 >  isc_dyn_fld_type               =         70;
2578 >  isc_dyn_fld_length             =         71;
2579 >  isc_dyn_fld_scale              =         72;
2580 >  isc_dyn_fld_sub_type           =         73;
2581 >  isc_dyn_fld_segment_length     =         74;
2582 >  isc_dyn_fld_query_header       =         75;
2583 >  isc_dyn_fld_edit_string        =         76;
2584 >  isc_dyn_fld_validation_blr     =         77;
2585 >  isc_dyn_fld_validation_source  =         78;
2586 >  isc_dyn_fld_computed_blr       =         79;
2587 >  isc_dyn_fld_computed_source    =         80;
2588 >  isc_dyn_fld_missing_value      =         81;
2589 >  isc_dyn_fld_default_value      =         82;
2590 >  isc_dyn_fld_query_name         =         83;
2591 >  isc_dyn_fld_dimensions         =         84;
2592 >  isc_dyn_fld_not_null           =         85;
2593 >  isc_dyn_fld_precision          =         86;
2594 >  isc_dyn_fld_char_length        =        172;
2595 >  isc_dyn_fld_collation          =        173;
2596 >  isc_dyn_fld_default_source     =        193;
2597 >  isc_dyn_del_default            =        197;
2598 >  isc_dyn_del_validation         =        198;
2599 >  isc_dyn_single_validation      =        199;
2600 >  isc_dyn_fld_character_set      =        203;
2601 >
2602 > (*************************************)
2603 > (** Local field specific attributes **)
2604 > (*************************************)
2605 >
2606 >  isc_dyn_fld_source             =         90;
2607 >  isc_dyn_fld_base_fld           =         91;
2608 >  isc_dyn_fld_position           =         92;
2609 >  isc_dyn_fld_update_flag        =         93;
2610 >
2611 > (*******************************)
2612 > (** Index specific attributes **)
2613 > (*******************************)
2614 >
2615 >  isc_dyn_idx_unique             =        100;
2616 >  isc_dyn_idx_inactive           =        101;
2617 >  isc_dyn_idx_type               =        103;
2618 >  isc_dyn_idx_foreign_key        =        104;
2619 >  isc_dyn_idx_ref_column         =        105;
2620 >  isc_dyn_idx_statistic          =        204;
2621 >
2622 > (*********************************)
2623 > (** Trigger specific attributes **)
2624 > (*********************************)
2625 >
2626 >  isc_dyn_trg_type               =        110;
2627 >  isc_dyn_trg_blr                =        111;
2628 >  isc_dyn_trg_source             =        112;
2629 >  isc_dyn_trg_name               =        114;
2630 >  isc_dyn_trg_sequence           =        115;
2631 >  isc_dyn_trg_inactive           =        116;
2632 >  isc_dyn_trg_msg_number         =        117;
2633 >  isc_dyn_trg_msg                =        118;
2634 >
2635 > (****************************************)
2636 > (** Security Class specific attributes **)
2637 > (****************************************)
2638 >
2639 >  isc_dyn_scl_acl                =        121;
2640 >  isc_dyn_grant_user             =        130;
2641 >  isc_dyn_grant_proc             =        186;
2642 >  isc_dyn_grant_trig             =        187;
2643 >  isc_dyn_grant_view             =        188;
2644 >  isc_dyn_grant_options          =        132;
2645 >  isc_dyn_grant_user_group       =        205;
2646 >
2647 > (************************************)
2648 > (** Dimension specific information **)
2649 > (************************************)
2650 >
2651 >  isc_dyn_dim_lower              =        141;
2652 >  isc_dyn_dim_upper              =        142;
2653 >
2654 > (******************************)
2655 > (** File specific attributes **)
2656 > (******************************)
2657 >
2658 >  isc_dyn_file_name              =        125;
2659 >  isc_dyn_file_start             =        126;
2660 >  isc_dyn_file_length            =        127;
2661 >  isc_dyn_shadow_number          =        128;
2662 >  isc_dyn_shadow_man_auto        =        129;
2663 >  isc_dyn_shadow_conditional     =        130;
2664 >
2665 > (**********************************)
2666 > (** Log file specific attributes **)
2667 > (**********************************)
2668 >
2669 >  isc_dyn_log_file_sequence      =        177;
2670 >  isc_dyn_log_file_partitions    =        178;
2671 >  isc_dyn_log_file_serial        =        179;
2672 >  isc_dyn_log_file_overflow      =        200;
2673 >  isc_dyn_log_file_raw           =        201;
2674 >
2675 > (*****************************)
2676 > (** Log specific attributes **)
2677 > (*****************************)
2678 >
2679 >  isc_dyn_log_group_commit_wait  =        189;
2680 >  isc_dyn_log_buffer_size        =        190;
2681 >  isc_dyn_log_check_point_length =        191;
2682 >  isc_dyn_log_num_of_buffers     =        192;
2683 >
2684 > (**********************************)
2685 > (** Function specific attributes **)
2686 > (**********************************)
2687 >
2688 >  isc_dyn_function_name          =        145;
2689 >  isc_dyn_function_type          =        146;
2690 >  isc_dyn_func_module_name       =        147;
2691 >  isc_dyn_func_entry_point       =        148;
2692 >  isc_dyn_func_return_argument   =        149;
2693 >  isc_dyn_func_arg_position      =        150;
2694 >  isc_dyn_func_mechanism         =        151;
2695 >  isc_dyn_filter_in_subtype      =        152;
2696 >  isc_dyn_filter_out_subtype     =        153;
2697 >
2698 >
2699 >  isc_dyn_description2           =        154;
2700 >  isc_dyn_fld_computed_source2   =        155;
2701 >  isc_dyn_fld_edit_string2       =        156;
2702 >  isc_dyn_fld_query_header2      =        157;
2703 >  isc_dyn_fld_validation_source2 =        158;
2704 >  isc_dyn_trg_msg2               =        159;
2705 >  isc_dyn_trg_source2            =        160;
2706 >  isc_dyn_view_source2           =        161;
2707 >  isc_dyn_xcp_msg2               =        184;
2708 >
2709 > (***********************************)
2710 > (** Generator specific attributes **)
2711 > (***********************************)
2712 >
2713 >  isc_dyn_generator_name         =         95;
2714 >  isc_dyn_generator_id           =         96;
2715 >
2716 > (***********************************)
2717 > (** Procedure specific attributes **)
2718 > (***********************************)
2719 >
2720 >  isc_dyn_prc_inputs             =        167;
2721 >  isc_dyn_prc_outputs            =        168;
2722 >  isc_dyn_prc_source             =        169;
2723 >  isc_dyn_prc_blr                =        170;
2724 >  isc_dyn_prc_source2            =        171;
2725 >
2726 > (***********************************)
2727 > (** Parameter specific attributes **)
2728 > (***********************************)
2729 >
2730 >  isc_dyn_prm_number             =        138;
2731 >  isc_dyn_prm_type               =        139;
2732 >
2733 > (**********************************)
2734 > (** Relation specific attributes **)
2735 > (**********************************)
2736 >
2737 >  isc_dyn_xcp_msg                =        185;
2738 >
2739 > (************************************************)
2740 > (** Cascading referential integrity values     **)
2741 > (************************************************)
2742 >  isc_dyn_foreign_key_update     =        205;
2743 >  isc_dyn_foreign_key_delete     =        206;
2744 >  isc_dyn_foreign_key_cascade    =        207;
2745 >  isc_dyn_foreign_key_default    =        208;
2746 >  isc_dyn_foreign_key_null       =        209;
2747 >  isc_dyn_foreign_key_none       =        210;
2748 >
2749 > (*************************)
2750 > (** SQL role values     **)
2751 > (*************************)
2752 >  isc_dyn_def_sql_role           =        211;
2753 >  isc_dyn_sql_role_name          =        212;
2754 >  isc_dyn_grant_admin_options    =        213;
2755 >  isc_dyn_del_sql_role           =        214;
2756 >
2757 > (******************************)
2758 > (** Last $dyn value assigned **)
2759 > (******************************)
2760 >
2761 >  isc_dyn_last_dyn_value         =        216;
2762 >
2763 > (********************************************)
2764 > (** Array slice description language (SDL) **)
2765 > (********************************************)
2766 >
2767 >  isc_sdl_version1               =          1;
2768 >  isc_sdl_eoc                    =         -1;
2769 >  isc_sdl_relation               =          2;
2770 >  isc_sdl_rid                    =          3;
2771 >  isc_sdl_field                  =          4;
2772 >  isc_sdl_fid                    =          5;
2773 >  isc_sdl_struct                 =          6;
2774 >  isc_sdl_variable               =          7;
2775 >  isc_sdl_scalar                 =          8;
2776 >  isc_sdl_tiny_integer           =          9;
2777 >  isc_sdl_short_integer          =         10;
2778 >  isc_sdl_long_integer           =         11;
2779 >  isc_sdl_literal                =         12;
2780 >  isc_sdl_add                    =         13;
2781 >  isc_sdl_subtract               =         14;
2782 >  isc_sdl_multiply               =         15;
2783 >  isc_sdl_divide                 =         16;
2784 >  isc_sdl_negate                 =         17;
2785 >  isc_sdl_eql                    =         18;
2786 >  isc_sdl_neq                    =         19;
2787 >  isc_sdl_gtr                    =         20;
2788 >  isc_sdl_geq                    =         21;
2789 >  isc_sdl_lss                    =         22;
2790 >  isc_sdl_leq                    =         23;
2791 >  isc_sdl_and                    =         24;
2792 >  isc_sdl_or                     =         25;
2793 >  isc_sdl_not                    =         26;
2794 >  isc_sdl_while                  =         27;
2795 >  isc_sdl_assignment             =         28;
2796 >  isc_sdl_label                  =         29;
2797 >  isc_sdl_leave                  =         30;
2798 >  isc_sdl_begin                  =         31;
2799 >  isc_sdl_end                    =         32;
2800 >  isc_sdl_do3                    =         33;
2801 >  isc_sdl_do2                    =         34;
2802 >  isc_sdl_do1                    =         35;
2803 >  isc_sdl_element                =         36;
2804 >
2805 > (**********************************************)
2806 > (** International text interpretation values **)
2807 > (**********************************************)
2808 >
2809 >  isc_interp_eng_ascii           =          0;
2810 >  isc_interp_jpn_sjis            =          5;
2811 >  isc_interp_jpn_euc             =          6;
2812 >
2813 > (******************************************)
2814 > (** Scroll direction for isc_dsql_fetch2 **)
2815 > (******************************************)
2816 >
2817 >  isc_fetch_next                 =          0;
2818 >  isc_fetch_prior                =          1;
2819 >  isc_fetch_first                =          2;
2820 >  isc_fetch_last                 =          3;
2821 >  isc_fetch_absolute             =          4;
2822 >  isc_fetch_relative             =          5;
2823 >
2824 > (*********************)
2825 > (** SQL definitions **)
2826 > (*********************)
2827 >  SQL_VARYING                    =        448;
2828 >  SQL_TEXT                       =        452;
2829 >  SQL_DOUBLE                     =        480;
2830 >  SQL_FLOAT                      =        482;
2831 >  SQL_LONG                       =        496;
2832 >  SQL_SHORT                      =        500;
2833 >  SQL_TIMESTAMP                  =        510;
2834 >  SQL_BLOB                       =        520;
2835 >  SQL_D_FLOAT                    =        530;
2836 >  SQL_ARRAY                      =        540;
2837 >  SQL_QUAD                       =        550;
2838 >  SQL_TYPE_TIME                  =        560;
2839 >  SQL_TYPE_DATE                  =        570;
2840 >  SQL_INT64                      =        580;
2841 >  SQL_DATE                       =        SQL_TIMESTAMP;
2842 >
2843 > (*******************)
2844 > (** Blob Subtypes **)
2845 > (*******************)
2846 >
2847 > (** types less than zero are reserved for customer use **)
2848 >
2849 >  isc_blob_untyped               =          0;
2850 >
2851 > (** internal subtypes **)
2852 >
2853 >  isc_blob_text                  =          1;
2854 >  isc_blob_blr                   =          2;
2855 >  isc_blob_acl                   =          3;
2856 >  isc_blob_ranges                =          4;
2857 >  isc_blob_summary               =          5;
2858 >  isc_blob_format                =          6;
2859 >  isc_blob_tra                   =          7;
2860 >  isc_blob_extfile               =          8;
2861 >
2862 > (** the range 20-30 is reserved for dBASE and Paradox types **)
2863 >
2864 >  isc_blob_formatted_memo        =         20;
2865 >  isc_blob_paradox_ole           =         21;
2866 >  isc_blob_graphic               =         22;
2867 >  isc_blob_dbase_ole             =         23;
2868 >  isc_blob_typed_binary          =         24;
2869 >
2870 > {$IFDEF IB5_ONLY}
2871 > (** SQLDA_LENGTH is defined in C as a macro, but in Pascal we must defined it
2872 >   as a function... **)
2873 > function SQLDA_LENGTH(n: Long): Long;
2874 > {$ENDIF}
2875 >
2876 > (** XSQLDA_LENGTH is defined in C as a macro, but in Pascal we must defined it
2877 >   as a function... **)
2878 > function XSQLDA_LENGTH(n: Long): Long;
2879 >
2880 > (** getb, putb, putbx are all defined in C as macros.
2881 >   Use functions and procedures for the functionality **)
2882 > function getb                   (p: PBSTREAM): Char;
2883 > function putb                   (x: Char; p: PBSTREAM): Int;
2884 > function putbx                  (x: Char; p: PBSTREAM): Int;
2885 >
2886 > (*
2887 > #define ADD_SPB_LENGTH(p, length)       {*(p)++ = (length); \
2888 >                                         *(p)++ = (length) >> 8;}
2889 >
2890 > #define ADD_SPB_NUMERIC(p, data)        {*(p)++ = (data); \
2891 >                                         *(p)++ = (data) >> 8; \
2892 >                                         *(p)++ = (data) >> 16; \
2893 >                                         *(p)++ = (data) >> 24;}
2894 > *)
2895 > procedure add_spb_length(var p: PChar; length: integer);
2896 > procedure add_spb_numeric(var p: PChar; data: integer);
2897 >
2898 >
2899 > implementation
2900 >
2901 > uses IBIntf, IB;
2902 >
2903 > {$IFDEF IB5_ONLY}
2904 > function SQLDA_LENGTH(n: Long): Long;
2905 > (*  The C-macro reads like this:
2906 >   SQLDA_LENGTH(n)         (sizeof (SQLDA) + (n-1) * sizeof (SQLVAR)) *)
2907 > begin
2908 >  result := sizeof(TSQLDA) + ((n - 1) * sizeof(TSQLVAR));
2909 > end;
2910 > {$ENDIF}
2911 >
2912 >
2913 > function XSQLDA_LENGTH(n: Long): Long;
2914 > (*  The C-macro reads like this:
2915 >   XSQLDA_LENGTH(n)     (sizeof (XSQLDA) + (n-1) * sizeof (XSQLVAR)) *)
2916 > begin
2917 >  result := SizeOf(TXSQLDA) + ((n - 1) * SizeOf(TXSQLVAR));
2918 > end;
2919 >
2920 > function getb(p: PBSTREAM): Char;
2921 > (*  The C-macro reads like this:
2922 >   getb(p)      (--(p)->bstr_cnt >= 0 ? *(p)->bstr_ptr++ & 0377: BLOB_get (p)) *)
2923 > begin
2924 >  Dec(p^.bstr_cnt);
2925 >  if (p^.bstr_cnt >= 0) then begin
2926 >    result := Char(Int(p^.bstr_ptr^) and Int(0377));
2927 >    Inc(p^.bstr_ptr);
2928 >  end else
2929 >    result := Char(BLOB_get(p));
2930 > end;
2931 >
2932 > function putb(x: Char; p: PBSTREAM): Int;
2933 > (*  The C-macro reads like this:
2934 >   putb(x,p) ((x == '\n' || (!(--(p)->bstr_cnt))) ?      // then
2935 >     BLOB_put (x,p) :                                    // else
2936 >     ((int) (*(p)->bstr_ptr++ = (unsigned) (x)))) *)
2937 > begin
2938 >  Dec(p^.bstr_cnt);
2939 >  if (x = Chr(Int('n') - Int('a'))) or (p^.bstr_cnt = 0) then
2940 >    result := BLOB_put(x, p)
2941 >  else begin
2942 >    p^.bstr_ptr^ := Char(x);
2943 >    result := UInt(x);
2944 >    Inc(p^.bstr_ptr^);
2945 >  end;
2946 > end;
2947 >
2948 > function putbx(x: Char; p: PBSTREAM): Int;
2949 > (*  The C-macro reads like this:
2950 >   putbx(x,p) ((!(--(p)->bstr_cnt)) ?    // then
2951 >     BLOB_put (x,p) :                    // else
2952 >     ((int) (*(p)->bstr_ptr++ = (unsigned) (x)))) *)
2953 > begin
2954 >  Dec(p^.bstr_cnt);
2955 >  if (p^.bstr_cnt = 0) then
2956 >    result := BLOB_put(x, p)
2957 >  else begin
2958 >    p^.bstr_ptr^ := Char(x);
2959 >    Inc(p^.bstr_ptr^);
2960 >    result := UInt(x);
2961 >  end;
2962 > end;
2963 >
2964 > (*******************************************)
2965 > (** Service manager functions             **)
2966 > (*******************************************)
2967 >
2968 >
2969 > procedure add_spb_length(var p: PChar; length: integer);
2970 > (*
2971 > #define ADD_SPB_LENGTH(p, length)       {*(p)++ = (length); \
2972 >                                         *(p)++ = (length) >> 8;}
2973 > *)
2974 > begin
2975 >  p^ := char(length);
2976 >  Inc (p);
2977 >  p^ := char(length shr 8);
2978 >  Inc (p);
2979 > end;
2980 >
2981 > procedure add_spb_numeric(var p: PChar; data: integer);
2982 > (*
2983 > #define ADD_SPB_NUMERIC(p, data)        {*(p)++ = (data); \
2984 >                                         *(p)++ = (data) >> 8; \
2985 >                                         *(p)++ = (data) >> 16; \
2986 >                                         *(p)++ = (data) >> 24;}
2987 > *)
2988 > begin
2989 >  p^ := char(data);
2990 >  Inc (p);
2991 >  p^ := char(data shr 8);
2992 >  Inc (p);
2993 >  p^ := char(data shr 16);
2994 >  Inc (p);
2995 >  p^ := char(data shr 24);
2996 >  Inc (p);
2997 > end;
2998 >
2999 > end.
3000 >

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines