ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/IBHeader.pas
Revision: 5
Committed: Fri Feb 18 16:26:16 2011 UTC (13 years, 1 month ago) by tony
Content type: text/x-pascal
File size: 140334 byte(s)
Log Message:
Committing updates for Release pre-release

File Contents

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