ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/client/2.5/IBHeader.pas
Revision: 56
Committed: Mon Mar 6 10:20:02 2017 UTC (7 years, 8 months ago) by tony
Content type: text/x-pascal
File size: 95014 byte(s)
Log Message:
Committing updates for Trunk

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 { IBX For Lazarus (Firebird Express) }
28 { Contributor: Tony Whyman, MWA Software http://www.mwasoftware.co.uk }
29 { Portions created by MWA Software are copyright McCallum Whyman }
30 { Associates Ltd 2011 }
31 { }
32 {************************************************************************}
33
34 unit IBHeader;
35 {$IFDEF MSWINDOWS}
36 {$DEFINE WINDOWS}
37 {$ENDIF}
38
39 {$IFDEF FPC}
40 {$mode delphi}
41 {$codepage UTF8}
42 {$ENDIF}
43
44 interface
45
46 uses
47 IBExternals, IB;
48
49
50 const
51 ISC_TRUE = 1;
52 ISC_FALSE = 0;
53 DSQL_close = 1;
54 DSQL_drop = 2;
55
56 const
57 SQLDA_VERSION1 = 1; (* pre V6.0 SQLDA *)
58 SQLDA_VERSION2 = 2; (* V6.0 SQLDA *)
59 SQL_DIALECT_V5 = 1; (* meaning is same as DIALECT_xsqlda *)
60 SQL_DIALECT_V6_TRANSITION = 2; (* flagging anything that is delimited
61 by double quotes as an error and
62 flagging keyword DATE as an error *)
63 SQL_DIALECT_V6 = 3; (* supports SQL delimited identifier,
64 SQLDATE/DATE, TIME, TIMESTAMP,
65 CURRENT_DATE, CURRENT_TIME,
66 CURRENT_TIMESTAMP, and 64-bit exact
67 numeric type *)
68 SQL_DIALECT_CURRENT = SQL_DIALECT_V6; (* latest IB DIALECT *)
69
70
71 type
72 (**********************************)
73 (** InterBase Handle Definitions **)
74 (**********************************)
75 TISC_ATT_HANDLE = FB_API_HANDLE;
76 PISC_ATT_HANDLE = ^TISC_ATT_HANDLE;
77 TISC_BLOB_HANDLE = FB_API_HANDLE;
78 PISC_BLOB_HANDLE = ^TISC_BLOB_HANDLE;
79 TISC_DB_HANDLE = FB_API_HANDLE;
80 PISC_DB_HANDLE = ^TISC_DB_HANDLE;
81 TISC_FORM_HANDLE = FB_API_HANDLE;
82 PISC_FORM_HANDLE = ^TISC_FORM_HANDLE;
83 TISC_REQ_HANDLE = FB_API_HANDLE;
84 PISC_REQ_HANDLE = ^TISC_REQ_HANDLE;
85 TISC_STMT_HANDLE = FB_API_HANDLE;
86 PISC_STMT_HANDLE = ^TISC_STMT_HANDLE;
87 TISC_SVC_HANDLE = FB_API_HANDLE;
88 PISC_SVC_HANDLE = ^TISC_SVC_HANDLE;
89 TISC_TR_HANDLE = FB_API_HANDLE;
90 PISC_TR_HANDLE = ^TISC_TR_HANDLE;
91 TISC_WIN_HANDLE = FB_API_HANDLE;
92 PISC_WIN_HANDLE = ^TISC_WIN_HANDLE;
93 TISC_CALLBACK = procedure;
94 ISC_SVC_HANDLE = ISC_LONG;
95
96 (*******************************************************************)
97 (* Time & Date Support *)
98 (*******************************************************************)
99 const
100 TIME_SECONDS_PRECISION = 10000;
101 TIME_SECONDS_PRECISION_SCALE = -4;
102
103 type
104 PPByte = ^PByte;
105 ISC_DATE = Long;
106 PISC_DATE = ^ISC_DATE;
107 ISC_TIME = ULong;
108 PISC_TIME = ^ISC_TIME;
109 TISC_TIMESTAMP = record
110 timestamp_date: ISC_DATE;
111 timestamp_time: ISC_TIME;
112 end;
113 PISC_TIMESTAMP = ^TISC_TIMESTAMP;
114
115 TISC_ARRAY_BOUND = record
116 array_bound_lower : short;
117 array_bound_upper : short;
118 end;
119 PISC_ARRAY_BOUND = ^TISC_ARRAY_BOUND;
120 TISC_ARRAY_DESC = record
121 array_desc_dtype : UChar;
122 array_desc_scale : ShortInt;
123 array_desc_length : UShort;
124 array_desc_field_name : array[0..31] of AnsiChar;
125 array_desc_relation_name : array[0..31] of AnsiChar;
126 array_desc_dimensions : Short;
127 array_desc_flags : Short;
128 array_desc_bounds : array[0..15] of TISC_ARRAY_BOUND;
129 end; // TISC_ARRAY_DESC
130 PISC_ARRAY_DESC = ^TISC_ARRAY_DESC;
131
132 TISC_BLOB_DESC = record
133 blob_desc_subtype : Short;
134 blob_desc_charset : Short;
135 blob_desc_segment_size : Short;
136 blob_desc_field_name : array[0..31] of AnsiChar;
137 blob_desc_relation_name : array[0..31] of AnsiChar;
138 end; // TISC_BLOB_DESC
139 PISC_BLOB_DESC = ^TISC_BLOB_DESC;
140
141 (*****************************)
142 (** Blob control structure **)
143 (*****************************)
144 TISC_BLOB_CTL_SOURCE_FUNCTION = function: ISC_STATUS; // ISC_FAR
145 PISC_BLOB_CTL = ^TISC_BLOB_CTL; // ISC_FAR
146 TISC_BLOB_CTL = record
147 (** Source filter **)
148 ctl_source : TISC_BLOB_CTL_SOURCE_FUNCTION;
149 (** Argument to pass to source filter **)
150 ctl_source_handle : PISC_BLOB_CTL;
151 ctl_to_sub_type : Short; (** Target type **)
152 ctl_from_sub_type : Short; (** Source type **)
153 ctl_buffer_length : UShort; (** Length of buffer **)
154 ctl_segment_length : UShort; (** Length of current segment **)
155 ctl_bpb_length : UShort; (** Length of blob parameter **)
156 (** block **)
157 ctl_bpb : PByte; (** Address of blob parameter **)
158 (** block **)
159 ctl_buffer : PUChar; (** Address of segment buffer **)
160 ctl_max_segment : ISC_LONG; (** Length of longest segment **)
161 ctl_number_segments : ISC_LONG; (** Total number of segments **)
162 ctl_total_length : ISC_LONG; (** Total length of blob **)
163 ctl_status : PISC_STATUS; (** Address of status vector **)
164 ctl_data : array[0..7] of long; (** Application specific data **)
165 end;
166 (*****************************)
167 (** Blob stream definitions **)
168 (*****************************)
169 TBSTREAM = record
170 bstr_blob : PVoid; (** Blob handle **)
171 bstr_buffer : PByte; (** Address of buffer **)
172 bstr_ptr : PByte; (** Next character **)
173 bstr_length : Short; (** Length of buffer **)
174 bstr_cnt : Short; (** Characters in buffer **)
175 bstr_mode : Char; (** (mode) ? OUTPUT : INPUT **)
176 end;
177 PBSTREAM = ^TBSTREAM;
178
179 (*****************************)
180 (** Dynamic SQL definitions **)
181 (*****************************)
182 {$IFDEF IB5_ONLY}
183 TSQLVAR = record
184 sqltype : Short;
185 sqllen : Short;
186 sqldata : PByte;
187 sqlind : PShort;
188 sqlname_length : Short;
189 sqlname : array[0..29] of AnsiChar;
190 end;
191 PSQLVAR = ^TSQLVAR;
192
193 TSQLDA = record
194 sqldaid : array[0..7] of AnsiChar;
195 sqldabc : ISC_LONG;
196 sqln : Short;
197 sqld : Short;
198 sqlvar : array[0..0] of TSQLVAR;
199 end;
200 PSQLDA = ^TSQLDA;
201 {$ENDIF}
202
203 (********************************)
204 (** Declare the extended SQLDA **)
205 (********************************)
206 TXSQLVAR = record
207 sqltype : Short; (** datatype of field **)
208 sqlscale : Short; (** scale factor **)
209 sqlsubtype : Short; (** datatype subtype - BLOBs **)
210 (** & text types only **)
211 sqllen : Short; (** length of data area **)
212 sqldata : PByte; (** address of data **)
213 sqlind : PShort; (** address of indicator **)
214 (** variable **)
215 sqlname_length : Short; (** length of sqlname field **)
216 (** name of field, name length + space for NULL **)
217 sqlname : array[0..31] of AnsiChar;
218 relname_length : Short; (** length of relation name **)
219 (** field's relation name + space for NULL **)
220 relname : array[0..31] of AnsiChar;
221 ownname_length : Short; (** length of owner name **)
222 (** relation's owner name + space for NULL **)
223 ownname : array[0..31] of AnsiChar;
224 aliasname_length : Short; (** length of alias name **)
225 (** relation's alias name + space for NULL **)
226 aliasname : array[0..31] of AnsiChar;
227 end; // TXSQLVAR
228 PXSQLVAR = ^TXSQLVAR;
229
230 TXSQLDA = record
231 version : Short; (** version of this XSQLDA **)
232 (** XSQLDA name field **)
233 sqldaid : array[0..7] of AnsiChar;
234 sqldabc : ISC_LONG; (** length in bytes of SQLDA **)
235 sqln : Short; (** number of fields allocated **)
236 sqld : Short; (** actual number of fields **)
237 (** first field address **)
238 sqlvar : array[0..0] of TXSQLVAR;
239 end; // TXSQLDA
240 PXSQLDA = ^TXSQLDA;
241
242 (********************************************************)
243 (** This record type is for passing arguments to **)
244 (** isc_start_transaction (See docs) **)
245 (********************************************************)
246 TISC_START_TRANS = record
247 db_handle : PISC_DB_HANDLE;
248 tpb_length : UShort;
249 tpb_address : PByte;
250 end;
251
252 (********************************************************)
253 (** This record type is for passing arguments to **)
254 (** isc_start_multiple (see docs) **)
255 (********************************************************)
256 TISC_TEB = record
257 db_handle : PISC_DB_HANDLE;
258 tpb_length : Long;
259 tpb_address : PByte;
260 end;
261 PISC_TEB = ^TISC_TEB;
262 TISC_TEB_ARRAY = array[0..0] of TISC_TEB;
263 PISC_TEB_ARRAY = ^TISC_TEB_ARRAY;
264
265 (*****************************)
266 (** OSRI database functions **)
267 (*****************************)
268
269 Tisc_attach_database = function (status_vector : PISC_STATUS;
270 db_name_length : Short;
271 db_name : PAnsiChar;
272 db_handle : PISC_DB_HANDLE;
273 parm_buffer_length : Short;
274 parm_buffer : PByte): ISC_STATUS;
275 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
276
277 Tisc_array_gen_sdl = function (status_vector : PISC_STATUS;
278 isc_array_desc : PISC_ARRAY_DESC;
279 isc_arg3 : PShort;
280 isc_arg4 : PByte;
281 isc_arg5 : PShort): ISC_STATUS;
282 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
283
284 Tisc_array_get_slice = function (status_vector : PISC_STATUS;
285 db_handle : PISC_DB_HANDLE;
286 trans_handle : PISC_TR_HANDLE;
287 array_id : PISC_QUAD;
288 descriptor : PISC_ARRAY_DESC;
289 dest_array : PVoid;
290 slice_length : PISC_LONG): ISC_STATUS;
291 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
292
293 Tisc_array_lookup_bounds = function (status_vector : PISC_STATUS;
294 db_handle : PISC_DB_HANDLE;
295 trans_handle : PISC_TR_HANDLE;
296 table_name,
297 column_name : PAnsiChar;
298 descriptor : PISC_ARRAY_DESC): ISC_STATUS;
299 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
300
301 Tisc_array_lookup_desc = function (status_vector : PISC_STATUS;
302 db_handle : PISC_DB_HANDLE;
303 trans_handle : PISC_TR_HANDLE;
304 table_name,
305 column_name : PByte;
306 descriptor : PISC_ARRAY_DESC): ISC_STATUS;
307 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
308
309 Tisc_array_set_desc = function (status_vector : PISC_STATUS;
310 table_name : PByte;
311 column_name : PByte;
312 sql_dtype,
313 sql_length,
314 sql_dimensions : PShort;
315 descriptor : PISC_ARRAY_DESC): ISC_STATUS;
316 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
317
318 Tisc_array_put_slice = function (status_vector : PISC_STATUS;
319 db_handle : PISC_DB_HANDLE;
320 trans_handle : PISC_TR_HANDLE;
321 array_id : PISC_QUAD;
322 descriptor : PISC_ARRAY_DESC;
323 source_array : PVoid;
324 slice_length : PISC_LONG): ISC_STATUS;
325 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
326
327 Tisc_blob_default_desc = procedure (descriptor : PISC_BLOB_DESC;
328 table_name : PUChar;
329 column_name : PUChar);
330 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
331
332 Tisc_blob_gen_bpb = function (status_vector : PISC_STATUS;
333 to_descriptor,
334 from_descriptor : PISC_BLOB_DESC;
335 bpb_buffer_length : UShort;
336 bpb_buffer : PUChar;
337 bpb_length : PUShort): ISC_STATUS;
338 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
339
340 Tisc_blob_info = function (status_vector : PISC_STATUS;
341 blob_handle : PISC_BLOB_HANDLE;
342 item_list_buffer_length : Short;
343 item_list_buffer : PByte;
344 result_buffer_length : Short;
345 result_buffer : PByte): ISC_STATUS;
346 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
347
348 Tisc_blob_lookup_desc = function (status_vector : PISC_STATUS;
349 db_handle : PISC_DB_HANDLE;
350 trans_handle : PISC_TR_HANDLE;
351 table_name,
352 column_name : PAnsiChar;
353 descriptor : PISC_BLOB_DESC;
354 global : PUChar): ISC_STATUS;
355 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
356
357 Tisc_blob_set_desc = function (status_vector : PISC_STATUS;
358 table_name,
359 column_name : PAnsiChar;
360 subtype,
361 charset,
362 segment_size : Short;
363 descriptor : PISC_BLOB_DESC): ISC_STATUS;
364 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
365
366 Tisc_cancel_blob = function (status_vector : PISC_STATUS;
367 blob_handle : PISC_BLOB_HANDLE): ISC_STATUS;
368 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
369
370 Tisc_cancel_events = function (status_vector : PISC_STATUS;
371 db_handle : PISC_DB_HANDLE;
372 event_id : PISC_LONG): ISC_STATUS;
373 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
374
375 Tisc_close_blob = function (status_vector : PISC_STATUS;
376 blob_handle : PISC_BLOB_HANDLE): ISC_STATUS;
377 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
378
379 Tisc_commit_retaining = function (status_vector : PISC_STATUS;
380 tran_handle : PISC_TR_HANDLE): ISC_STATUS;
381 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
382
383 Tisc_commit_transaction = function (status_vector : PISC_STATUS;
384 tran_handle : PISC_TR_HANDLE): ISC_STATUS;
385 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
386
387 Tisc_create_blob = function (status_vector : PISC_STATUS;
388 db_handle : PISC_DB_HANDLE;
389 tran_handle : PISC_TR_HANDLE;
390 blob_handle : PISC_BLOB_HANDLE;
391 blob_id : PISC_QUAD): ISC_STATUS;
392 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
393
394 Tisc_create_blob2 = function (status_vector : PISC_STATUS;
395 db_handle : PISC_DB_HANDLE;
396 tran_handle : PISC_TR_HANDLE;
397 blob_handle : PISC_BLOB_HANDLE;
398 blob_id : PISC_QUAD;
399 bpb_length : Short;
400 bpb_address : PByte): ISC_STATUS;
401 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
402
403 Tisc_create_database = function (status_vector : PISC_STATUS;
404 isc_arg2 : Short;
405 isc_arg3 : PByte;
406 db_handle : PISC_DB_HANDLE;
407 isc_arg5 : Short;
408 isc_arg6 : PByte;
409 isc_arg7 : Short): ISC_STATUS;
410 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
411
412 Tisc_database_info = function (status_vector : PISC_STATUS;
413 db_handle : PISC_DB_HANDLE;
414 item_list_buffer_length : Short;
415 item_list_buffer : PByte;
416 result_buffer_length : Short;
417 result_buffer : PByte): ISC_STATUS;
418 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
419
420 Tisc_decode_date = procedure (ib_date: PISC_QUAD;
421 tm_date: PCTimeStructure);
422 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
423
424 Tisc_decode_sql_date = procedure (ib_date: PISC_DATE;
425 tm_date: PCTimeStructure);
426 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
427
428 Tisc_decode_sql_time = procedure (ib_time: PISC_TIME;
429 tm_date: PCTimeStructure);
430 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
431
432 Tisc_decode_timestamp = procedure (ib_timestamp: PISC_TIMESTAMP;
433 tm_date: PCTimeStructure);
434 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
435
436 Tisc_detach_database = function (status_vector : PISC_STATUS;
437 db_handle : PISC_DB_HANDLE): ISC_STATUS;
438 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
439
440 Tisc_drop_database = function (status_vector : PISC_STATUS;
441 db_handle : PISC_DB_HANDLE): ISC_STATUS;
442 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
443
444 Tisc_dsql_allocate_statement = function (status_vector : PISC_STATUS;
445 db_handle : PISC_DB_HANDLE;
446 stmt_handle : PISC_STMT_HANDLE): ISC_STATUS;
447 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
448
449 Tisc_dsql_alloc_statement2 = function (status_vector : PISC_STATUS;
450 db_handle : PISC_DB_HANDLE;
451 stmt_handle : PISC_STMT_HANDLE): ISC_STATUS;
452 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
453
454 Tisc_dsql_describe = function (status_vector : PISC_STATUS;
455 stmt_handle : PISC_STMT_HANDLE;
456 dialect : UShort;
457 xsqlda : PXSQLDA): ISC_STATUS;
458 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
459
460 Tisc_dsql_describe_bind = function (status_vector : PISC_STATUS;
461 stmt_handle : PISC_STMT_HANDLE;
462 dialect : UShort;
463 xsqlda : PXSQLDA): ISC_STATUS;
464 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
465
466 Tisc_dsql_exec_immed2 = function (status_vector : PISC_STATUS;
467 db_handle : PISC_DB_HANDLE;
468 tran_handle : PISC_TR_HANDLE;
469 length : UShort;
470 statement : PByte;
471 dialect : UShort;
472 in_xsqlda,
473 out_xsqlda : PXSQLDA): ISC_STATUS;
474 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
475
476 Tisc_dsql_execute = function (status_vector : PISC_STATUS;
477 tran_handle : PISC_TR_HANDLE;
478 stmt_handle : PISC_STMT_HANDLE;
479 dialect : UShort;
480 xsqlda : PXSQLDA): ISC_STATUS;
481 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
482
483 Tisc_dsql_execute2 = function (status_vector : PISC_STATUS;
484 tran_handle : PISC_TR_HANDLE;
485 stmt_handle : PISC_STMT_HANDLE;
486 dialect : UShort;
487 in_xsqlda,
488 out_xsqlda : PXSQLDA): ISC_STATUS;
489 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
490
491 Tisc_dsql_execute_immediate = function (status_vector : PISC_STATUS;
492 db_handle : PISC_DB_HANDLE;
493 tran_handle : PISC_TR_HANDLE;
494 length : UShort;
495 statement : PAnsiChar;
496 dialect : UShort;
497 xsqlda : PXSQLDA): ISC_STATUS;
498 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
499
500 Tisc_dsql_fetch = function (status_vector : PISC_STATUS;
501 stmt_handle : PISC_STMT_HANDLE;
502 dialect : UShort;
503 xsqlda : PXSQLDA): ISC_STATUS;
504 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
505
506 (*$ifdef SCROLLABLE_CURSORS*)
507 Tisc_dsql_fetch2 = function (status_vector : PISC_STATUS;
508 stmt_handle : PISC_STMT_HANDLE;
509 dialect : UShort;
510 xsqlda : PXSQLDA;
511 isc_arg5 : UShort;
512 isc_arg6 : Long): ISC_STATUS;
513 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
514 (*$endif*)
515
516 Tisc_dsql_finish = function (db_handle : PISC_DB_HANDLE): ISC_STATUS;
517 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
518
519 Tisc_dsql_free_statement = function (status_vector : PISC_STATUS;
520 stmt_handle : PISC_STMT_HANDLE;
521 options : UShort): ISC_STATUS;
522 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
523
524 Tisc_dsql_insert = function (status_vector : PISC_STATUS;
525 stmt_handle : PISC_STMT_HANDLE;
526 arg3 : UShort;
527 xsqlda : PXSQLDA): ISC_STATUS;
528 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
529
530 Tisc_dsql_prepare = function (status_vector : PISC_STATUS;
531 tran_handle : PISC_TR_HANDLE;
532 stmt_handle : PISC_STMT_HANDLE;
533 length : UShort;
534 statement : PAnsiChar;
535 dialect : UShort;
536 xsqlda : PXSQLDA): ISC_STATUS;
537 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
538
539 Tisc_dsql_set_cursor_name = function (status_vector : PISC_STATUS;
540 stmt_handle : PISC_STMT_HANDLE;
541 cursor_name : PAnsiChar;
542 _type : UShort): ISC_STATUS;
543 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
544
545 Tisc_dsql_sql_info = function (status_vector : PISC_STATUS;
546 stmt_handle : PISC_STMT_HANDLE;
547 item_length : Short;
548 items : PByte;
549 buffer_length : Short;
550 buffer : PByte): ISC_STATUS;
551 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
552
553 Tisc_encode_date = procedure (tm_date : PCTimeStructure;
554 ib_date : PISC_QUAD);
555 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
556
557 Tisc_encode_sql_date = procedure (tm_date : PCTimeStructure;
558 ib_date : PISC_DATE);
559 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
560
561 Tisc_encode_sql_time = procedure (tm_date : PCTimeStructure;
562 ib_time : PISC_TIME);
563 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
564
565 Tisc_encode_timestamp = procedure (tm_date : PCTimeStructure;
566 ib_timestamp : PISC_TIMESTAMP);
567 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
568
569 Tisc_event_block = function (event_buffer : PPByte;
570 result_buffer : PPByte;
571 id_count : UShort):ISC_LONG;
572 cdecl varargs;
573
574 Tisc_event_counts = procedure (status_vector : PISC_LONG;
575 buffer_length : Short;
576 event_buffer : PByte;
577 result_buffer : PByte);
578 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
579
580 Tisc_expand_dpb = procedure (dpb : PPByte;
581 dpb_length : PShort;
582 item_list : array of Pointer);
583 cdecl;
584
585 Tisc_modify_dpb = function (dpb : PPByte;
586 isc_arg2,
587 isc_arg3 : PShort;
588 isc_arg4 : UShort;
589 isc_arg5 : PByte;
590 isc_arg6 : Short): Int;
591 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
592
593 Tisc_free = function (isc_arg1 : PByte): ISC_LONG;
594 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
595
596 Tisc_get_segment = function (status_vector : PISC_STATUS;
597 blob_handle : PISC_BLOB_HANDLE;
598 actual_seg_length : PUShort;
599 seg_buffer_length : UShort;
600 seg_buffer : PByte): ISC_STATUS;
601 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
602
603 Tisc_get_slice = function (status_vector : PISC_STATUS;
604 db_handle : PISC_DB_HANDLE;
605 tran_handle : PISC_TR_HANDLE;
606 isc_arg4 : PISC_QUAD;
607 isc_arg5 : Short;
608 isc_arg6 : PByte;
609 isc_arg7 : Short;
610 isc_arg8 : PISC_LONG;
611 isc_arg9 : ISC_LONG;
612 isc_arg10 : PVoid;
613 isc_arg11 : PISC_LONG): ISC_STATUS;
614 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
615
616 Tisc_interprete = function (buffer : PByte;
617 status_vector : PPISC_STATUS): ISC_STATUS;
618 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
619
620 Tisc_open_blob = function (status_vector : PISC_STATUS;
621 db_handle : PISC_DB_HANDLE;
622 tran_handle : PISC_TR_HANDLE;
623 blob_handle : PISC_BLOB_HANDLE;
624 blob_id : PISC_QUAD): ISC_STATUS;
625 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
626
627 Tisc_open_blob2 = function (status_vector : PISC_STATUS;
628 db_handle : PISC_DB_HANDLE;
629 tran_handle : PISC_TR_HANDLE;
630 blob_handle : PISC_BLOB_HANDLE;
631 blob_id : PISC_QUAD;
632 bpb_length : Short;
633 bpb_buffer : PByte): ISC_STATUS;
634 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
635
636 Tisc_prepare_transaction2 = function (status_vector : PISC_STATUS;
637 tran_handle : PISC_TR_HANDLE;
638 msg_length : Short;
639 msg : PByte): ISC_STATUS;
640 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
641
642 Tisc_print_sqlerror = procedure (sqlcode : Short;
643 status_vector : PISC_STATUS);
644 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
645
646 Tisc_print_status = function (status_vector : PISC_STATUS): ISC_STATUS;
647 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
648
649 Tisc_put_segment = function (status_vector : PISC_STATUS;
650 blob_handle : PISC_BLOB_HANDLE;
651 seg_buffer_len : UShort;
652 seg_buffer : PByte): ISC_STATUS;
653 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
654
655 Tisc_put_slice = function (status_vector : PISC_STATUS;
656 db_handle : PISC_DB_HANDLE;
657 tran_handle : PISC_TR_HANDLE;
658 isc_arg4 : PISC_QUAD;
659 isc_arg5 : Short;
660 isc_arg6 : PByte;
661 isc_arg7 : Short;
662 isc_arg8 : PISC_LONG;
663 isc_arg9 : ISC_LONG;
664 isc_arg10 : PVoid): ISC_STATUS;
665 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
666
667 Tisc_que_events = function (status_vector : PISC_STATUS;
668 db_handle : PISC_DB_HANDLE;
669 event_id : PISC_LONG;
670 length : Short;
671 event_buffer : PByte;
672 event_function : TISC_CALLBACK;
673 event_function_arg : PVoid): ISC_STATUS;
674 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
675
676 Tisc_rollback_retaining = function (status_vector : PISC_STATUS;
677 tran_handle : PISC_TR_HANDLE): ISC_STATUS;
678 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
679
680 Tisc_rollback_transaction = function (status_vector : PISC_STATUS;
681 tran_handle : PISC_TR_HANDLE): ISC_STATUS;
682 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
683
684 Tisc_start_multiple = function (status_vector : PISC_STATUS;
685 tran_handle : PISC_TR_HANDLE;
686 db_handle_count : Short;
687 teb_vector_address : PISC_TEB): ISC_STATUS;
688 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
689
690 Tisc_start_transaction = function (status_vector : PISC_STATUS;
691 tran_handle : PISC_TR_HANDLE;
692 db_handle_count : Short;
693 db_handle : PISC_DB_HANDLE;
694 tpb_length : UShort;
695 tpb_address : PByte): ISC_STATUS;
696 cdecl;
697
698 Tisc_sqlcode = function (status_vector : PISC_STATUS): ISC_LONG;
699 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
700
701
702 Tisc_sql_interprete = procedure (sqlcode : Short;
703 buffer : PAnsiChar;
704 buffer_length : Short);
705 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
706
707 Tisc_transaction_info = function (status_vector : PISC_STATUS;
708 tran_handle : PISC_TR_HANDLE;
709 item_list_buffer_length : Short;
710 item_list_buffer : PByte;
711 result_buffer_length : Short;
712 result_buffer : PByte): ISC_STATUS;
713 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
714
715 Tisc_transact_request = function (status_vector : PISC_STATUS;
716 db_handle : PISC_DB_HANDLE;
717 tran_handle : PISC_TR_HANDLE;
718 isc_arg4 : UShort;
719 isc_arg5 : PByte;
720 isc_arg6 : UShort;
721 isc_arg7 : PByte;
722 isc_arg8 : UShort;
723 isc_arg9 : PByte): ISC_STATUS;
724 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
725
726 Tisc_vax_integer = function (buffer : PByte;
727 length : Short): ISC_LONG;
728 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
729
730 Tisc_portable_integer = function (buffer : PByte;
731 length : Short): ISC_INT64;
732 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
733
734 (***************************************)
735 (** Security Functions and structures **)
736 (***************************************)
737
738 const
739 sec_uid_spec = $01;
740 sec_gid_spec = $02;
741 sec_server_spec = $04;
742 sec_password_spec = $08;
743 sec_group_name_spec = $10;
744 sec_first_name_spec = $20;
745 sec_middle_name_spec = $40;
746 sec_last_name_spec = $80;
747 sec_dba_user_name_spec = $100;
748 sec_dba_password_spec = $200;
749
750 sec_protocol_tcpip = 1;
751 sec_protocol_netbeui = 2;
752 sec_protocol_spx = 3;
753 sec_protocol_local = 4;
754
755 type
756 TUserSecData = record
757 sec_flags: Short; (** which fields are specified **)
758 uid: Int; (** the user's id **)
759 gid: int; (** the user's group id **)
760 protocol: Int; (** protocol to use for connection **)
761 server: PByte; (** server to administer **)
762 user_name: PByte; (** the user's name **)
763 password: PByte; (** the user's password **)
764 group_name: PByte; (** the group name **)
765 first_name: PByte; (** the user's first name **)
766 middle_name: PByte; (** the user's middle name **)
767 last_name: PByte; (** the user's last name **)
768 dba_user_name: PByte; (** the dba user name **)
769 dba_password: PByte; (** the dba password **)
770 end;
771 PUserSecData = ^TUserSecData;
772
773 Tisc_add_user = function (status_vector : PISC_STATUS;
774 user_sec_data : PUserSecData): ISC_STATUS;
775 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
776
777 Tisc_delete_user = function (status_vector : PISC_STATUS;
778 user_sec_data : PUserSecData): ISC_STATUS;
779 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
780
781 Tisc_modify_user = function (status_vector : PISC_STATUS;
782 user_sec_data : PUserSecData): ISC_STATUS;
783 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
784
785 (************************************)
786 (** Other OSRI functions **)
787 (************************************)
788
789 Tisc_compile_request = function (status_vector : PISC_STATUS;
790 db_handle : PISC_DB_HANDLE;
791 request_handle : PISC_REQ_HANDLE;
792 isc_arg4 : Short;
793 isc_arg5 : PByte): ISC_STATUS;
794 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
795
796 Tisc_compile_request2 = function (status_vector : PISC_STATUS;
797 db_handle : PISC_DB_HANDLE;
798 request_handle : PISC_REQ_HANDLE;
799 isc_arg4 : Short;
800 isc_arg5 : PByte): ISC_STATUS;
801 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
802
803 Tisc_ddl = function (status_vector : PISC_STATUS;
804 db_handle : PISC_DB_HANDLE;
805 tran_handle : PISC_TR_HANDLE;
806 isc_arg4 : Short;
807 isc_arg5 : PByte): ISC_STATUS;
808 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
809
810 Tisc_prepare_transaction = function (status_vector : PISC_STATUS;
811 tran_handle : PISC_TR_HANDLE): ISC_STATUS;
812 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
813
814
815 Tisc_receive = function (status_vector : PISC_STATUS;
816 request_handle : PISC_REQ_HANDLE;
817 isc_arg3,
818 isc_arg4 : Short;
819 isc_arg5 : PVoid;
820 isc_arg6 : Short): ISC_STATUS;
821 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
822
823 Tisc_receive2 = function (status_vector : PISC_STATUS;
824 request_handle : PISC_REQ_HANDLE;
825 isc_arg3,
826 isc_arg4 : Short;
827 isc_arg5 : PVoid;
828 isc_arg6,
829 isc_arg7 : Short;
830 isc_arg8 : Long): ISC_STATUS;
831 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
832
833 Tisc_reconnect_transaction = function (status_vector : PISC_STATUS;
834 db_handle : PISC_DB_HANDLE;
835 tran_handle : PISC_TR_HANDLE;
836 isc_arg4 : Short;
837 isc_arg5 : PByte): ISC_STATUS;
838 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
839
840 Tisc_release_request = function (status_vector : PISC_STATUS;
841 request_handle : PISC_REQ_HANDLE): ISC_STATUS;
842 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
843
844 Tisc_request_info = function (status_vector : PISC_STATUS;
845 request_handle : PISC_REQ_HANDLE;
846 isc_arg3 : Short;
847 isc_arg4 : Short;
848 isc_arg5 : PByte;
849 isc_arg6 : Short;
850 isc_arg7 : PByte): ISC_STATUS;
851 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
852
853 Tisc_seek_blob = function (status_vector : PISC_STATUS;
854 blob_handle : PISC_BLOB_HANDLE;
855 isc_arg3 : Short;
856 isc_arg4 : ISC_LONG;
857 isc_arg5 : PISC_LONG): ISC_STATUS;
858 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
859
860 Tisc_send = function (status_vector : PISC_STATUS;
861 request_handle : PISC_REQ_HANDLE;
862 isc_arg3,
863 isc_arg4 : Short;
864 isc_arg5 : PVoid;
865 isc_arg6 : Short): ISC_STATUS;
866 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
867
868 Tisc_start_and_send = function (status_vector : PISC_STATUS;
869 request_handle : PISC_REQ_HANDLE;
870 tran_handle : PISC_TR_HANDLE;
871 isc_arg4,
872 isc_arg5 : Short;
873 isc_arg6 : PVoid;
874 isc_arg7 : Short): ISC_STATUS;
875 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
876
877 Tisc_start_request = function (status_vector : PISC_STATUS;
878 request_handle : PISC_REQ_HANDLE;
879 tran_handle : PISC_TR_HANDLE;
880 isc_arg4 : Short): ISC_STATUS;
881 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
882
883 Tisc_unwind_request = function (status_vector : PISC_STATUS;
884 tran_handle : PISC_TR_HANDLE;
885 isc_arg3 : Short): ISC_STATUS;
886 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
887
888 Tisc_wait_for_event = function (status_vector : PISC_STATUS;
889 db_handle : PISC_DB_HANDLE;
890 length : Short;
891 event_buffer,
892 result_buffer : PByte): ISC_STATUS;
893 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
894
895 (*******************************)
896 (** Other Sql functions **)
897 (*******************************)
898 {$IFDEF IB5_ONLY}
899 Tisc_close = function (status_vector : PISC_STATUS;
900 isc_arg2 : PByte): ISC_STATUS;
901 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
902
903 Tisc_declare = function (status_vector : PISC_STATUS;
904 isc_arg2,
905 isc_arg3 : PByte): ISC_STATUS;
906 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
907
908 Tisc_describe = function (status_vector : PISC_STATUS;
909 isc_arg2 : PByte;
910 isc_arg3 : PSQLDA): ISC_STATUS;
911 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
912
913 Tisc_describe_bind = function (status_vector : PISC_STATUS;
914 isc_arg2 : PByte;
915 isc_arg3 : PSQLDA): ISC_STATUS;
916 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
917
918 Tisc_execute = function (status_vector : PISC_STATUS;
919 tran_handle : PISC_TR_HANDLE;
920 isc_arg3 : PByte;
921 isc_arg4 : PSQLDA): ISC_STATUS;
922 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
923
924 Tisc_execute_immediate = function (status_vector : PISC_STATUS;
925 db_handle : PISC_DB_HANDLE;
926 tran_handle : PISC_TR_HANDLE;
927 isc_arg4 : PShort;
928 isc_arg5 : PByte): ISC_STATUS;
929 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
930
931 Tisc_fetch = function (status_vector : PISC_STATUS;
932 isc_arg2 : PByte;
933 isc_arg3 : PSQLDA): ISC_STATUS;
934 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
935
936 Tisc_open = function (status_vector : PISC_STATUS;
937 tran_handle : PISC_TR_HANDLE;
938 isc_arg3 : PByte;
939 isc_arg4 : PSQLDA): ISC_STATUS;
940 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
941
942 Tisc_prepare = function (status_vector : PISC_STATUS;
943 db_handle : PISC_DB_HANDLE;
944 tran_handle : PISC_TR_HANDLE;
945 isc_arg4 : PByte;
946 isc_arg5 : PShort;
947 isc_arg6 : PByte;
948 isc_arg7 : PSQLDA): ISC_STATUS;
949 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
950 {$ELSE}
951 Tisc_close = function (status_vector : PISC_STATUS;
952 isc_arg2 : PByte): ISC_STATUS;
953 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
954
955 Tisc_declare = function (status_vector : PISC_STATUS;
956 isc_arg2,
957 isc_arg3 : PByte): ISC_STATUS;
958 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
959
960 Tisc_describe = function (status_vector : PISC_STATUS;
961 isc_arg2 : PByte;
962 isc_arg3 : PXSQLDA): ISC_STATUS;
963 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
964
965 Tisc_describe_bind = function (status_vector : PISC_STATUS;
966 isc_arg2 : PByte;
967 isc_arg3 : PXSQLDA): ISC_STATUS;
968 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
969
970 Tisc_execute = function (status_vector : PISC_STATUS;
971 tran_handle : PISC_TR_HANDLE;
972 isc_arg3 : PByte;
973 isc_arg4 : PXSQLDA): ISC_STATUS;
974 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
975
976 Tisc_execute_immediate = function (status_vector : PISC_STATUS;
977 db_handle : PISC_DB_HANDLE;
978 tran_handle : PISC_TR_HANDLE;
979 isc_arg4 : PShort;
980 isc_arg5 : PByte): ISC_STATUS;
981 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
982
983 Tisc_fetch = function (status_vector : PISC_STATUS;
984 isc_arg2 : PByte;
985 isc_arg3 : PXSQLDA): ISC_STATUS;
986 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
987
988 Tisc_open = function (status_vector : PISC_STATUS;
989 tran_handle : PISC_TR_HANDLE;
990 isc_arg3 : PByte;
991 isc_arg4 : PXSQLDA): ISC_STATUS;
992 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
993
994 Tisc_prepare = function (status_vector : PISC_STATUS;
995 db_handle : PISC_DB_HANDLE;
996 tran_handle : PISC_TR_HANDLE;
997 isc_arg4 : PByte;
998 isc_arg5 : PShort;
999 isc_arg6 : PByte;
1000 isc_arg7 : PXSQLDA): ISC_STATUS;
1001 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1002 {$ENDIF}
1003
1004 (***************************************)
1005 (** Other Dynamic sql functions **)
1006 (***************************************)
1007
1008 Tisc_dsql_execute_m = function (status_vector : PISC_STATUS;
1009 tran_handle : PISC_TR_HANDLE;
1010 statement_handle : PISC_STMT_HANDLE;
1011 isc_arg4 : UShort;
1012 isc_arg5 : PByte;
1013 isc_arg6 : UShort;
1014 isc_arg7 : UShort;
1015 isc_arg8 : PByte): ISC_STATUS;
1016 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1017
1018 Tisc_dsql_execute2_m = function (status_vector : PISC_STATUS;
1019 tran_handle : PISC_TR_HANDLE;
1020 statement_handle : PISC_STMT_HANDLE;
1021 isc_arg4 : UShort;
1022 isc_arg5 : PByte;
1023 isc_arg6 : UShort;
1024 isc_arg7 : UShort;
1025 isc_arg8 : PByte;
1026 isc_arg9 : UShort;
1027 isc_arg10 : PByte;
1028 isc_arg11 : UShort;
1029 isc_arg12 : UShort;
1030 isc_arg13 : PByte): ISC_STATUS;
1031 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1032
1033 Tisc_dsql_execute_immediate_m = function (status_vector : PISC_STATUS;
1034 db_handle : PISC_DB_HANDLE;
1035 tran_handle : PISC_TR_HANDLE;
1036 isc_arg4 : UShort;
1037 isc_arg5 : PByte;
1038 isc_arg6 : UShort;
1039 isc_arg7 : UShort;
1040 isc_arg8 : PByte;
1041 isc_arg9 : UShort;
1042 isc_arg10 : UShort;
1043 isc_arg11 : PByte): ISC_STATUS;
1044 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1045
1046 Tisc_dsql_exec_immed3_m = function (status_vector : PISC_STATUS;
1047 db_handle : PISC_DB_HANDLE;
1048 tran_handle : PISC_TR_HANDLE;
1049 isc_arg4 : UShort;
1050 isc_arg5 : PByte;
1051 isc_arg6 : UShort;
1052 isc_arg7 : UShort;
1053 isc_arg8 : PByte;
1054 isc_arg9 : UShort;
1055 isc_arg10 : UShort;
1056 isc_arg11 : PByte;
1057 isc_arg12 : UShort;
1058 isc_arg13 : PByte;
1059 isc_arg14 : UShort;
1060 isc_arg15 : UShort;
1061 isc_arg16 : PByte): ISC_STATUS;
1062 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1063
1064 Tisc_dsql_fetch_m = function (status_vector : PISC_STATUS;
1065 statement_handle : PISC_STMT_HANDLE;
1066 isc_arg3 : UShort;
1067 isc_arg4 : PByte;
1068 isc_arg5 : UShort;
1069 isc_arg6 : UShort;
1070 isc_arg7 : PByte): ISC_STATUS;
1071 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1072
1073 (*$ifdef SCROLLABLE_CURSORS*)
1074 Tisc_dsql_fetch2_m = function (status_vector : PISC_STATUS;
1075 statement_handle : PISC_STMT_HANDLE;
1076 isc_arg3 : UShort;
1077 isc_arg4 : PByte;
1078 isc_arg5 : UShort;
1079 isc_arg6 : UShort;
1080 isc_arg7 : PByte;
1081 isc_arg8 : UShort;
1082 isc_arg9 : Long): ISC_STATUS;
1083 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1084 (*$endif*)
1085
1086 Tisc_dsql_insert_m = function (status_vector : PISC_STATUS;
1087 statement_handle : PISC_STMT_HANDLE;
1088 isc_arg3 : UShort;
1089 isc_arg4 : PByte;
1090 isc_arg5 : UShort;
1091 isc_arg6 : UShort;
1092 isc_arg7 : PByte): ISC_STATUS;
1093 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1094
1095 Tisc_dsql_prepare_m = function (status_vector : PISC_STATUS;
1096 tran_handle : PISC_TR_HANDLE;
1097 statement_handle : PISC_STMT_HANDLE;
1098 isc_arg4 : UShort;
1099 isc_arg5 : PByte;
1100 isc_arg6 : UShort;
1101 isc_arg7 : UShort;
1102 isc_arg8 : PByte;
1103 isc_arg9 : UShort;
1104 isc_arg10 : PByte): ISC_STATUS;
1105 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1106
1107 Tisc_dsql_release = function (status_vector : PISC_STATUS;
1108 isc_arg2 : PByte): ISC_STATUS;
1109 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1110
1111 Tisc_embed_dsql_close = function(status_vector : PISC_STATUS;
1112 isc_arg2 : PByte): ISC_STATUS;
1113 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1114
1115 Tisc_embed_dsql_declare = function (status_vector : PISC_STATUS;
1116 isc_arg2 : PByte;
1117 isc_arg3 : PByte): ISC_STATUS;
1118 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1119
1120 Tisc_embed_dsql_describe = function (status_vector : PISC_STATUS;
1121 isc_arg2 : PByte;
1122 isc_arg3 : UShort;
1123 isc_arg4 : PXSQLDA): ISC_STATUS;
1124 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1125
1126 Tisc_embed_dsql_describe_bind = function (status_vector : PISC_STATUS;
1127 isc_arg2 : PByte;
1128 isc_arg3 : UShort;
1129 isc_arg4 : PXSQLDA): ISC_STATUS;
1130 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1131
1132 Tisc_embed_dsql_execute = function (status_vector : PISC_STATUS;
1133 tran_handle : PISC_TR_HANDLE;
1134 isc_arg3 : PByte;
1135 isc_arg4 : UShort;
1136 isc_arg5 : PXSQLDA): ISC_STATUS;
1137 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1138
1139 Tisc_embed_dsql_execute2 = function (status_vector : PISC_STATUS;
1140 tran_handle : PISC_TR_HANDLE;
1141 isc_arg3 : PByte;
1142 isc_arg4 : UShort;
1143 isc_arg5 : PXSQLDA;
1144 isc_arg6 : PXSQLDA): ISC_STATUS;
1145 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1146
1147 Tisc_embed_dsql_execute_immed = function (status_vector : PISC_STATUS;
1148 db_handle : PISC_DB_HANDLE;
1149 tran_handle : PISC_TR_HANDLE;
1150 isc_arg4 : UShort;
1151 isc_arg5 : PByte;
1152 isc_arg6 : UShort;
1153 isc_arg7 : PXSQLDA): ISC_STATUS;
1154 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1155
1156 Tisc_embed_dsql_fetch = function(status_vector : PISC_STATUS;
1157 isc_arg2 : PByte;
1158 isc_arg3 : UShort;
1159 isc_arg4 : PXSQLDA): ISC_STATUS;
1160 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1161
1162 (*$ifdef SCROLLABLE_CURSORS*)
1163 Tisc_embed_dsql_fetch2 = function (status_vector : PISC_STATUS;
1164 isc_arg2 : PByte;
1165 isc_arg3 : UShort;
1166 isc_arg4 : PXSQLDA;
1167 isc_arg5 : UShort;
1168 isc_arg6 : Long): ISC_STATUS;
1169 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1170 (*$endif*)
1171
1172 Tisc_embed_dsql_open = function (status_vector : PISC_STATUS;
1173 tran_handle : PISC_TR_HANDLE;
1174 isc_arg3 : PByte;
1175 isc_arg4 : UShort;
1176 isc_arg5 : PXSQLDA): ISC_STATUS;
1177 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1178
1179 Tisc_embed_dsql_open2 = function (status_vector : PISC_STATUS;
1180 tran_handle : PISC_TR_HANDLE;
1181 isc_arg3 : PByte;
1182 isc_arg4 : UShort;
1183 isc_arg5 : PXSQLDA;
1184 isc_arg6 : PXSQLDA): ISC_STATUS;
1185 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1186
1187 Tisc_embed_dsql_insert = function (status_vector : PISC_STATUS;
1188 isc_arg2 : PByte;
1189 isc_arg3 : UShort;
1190 isc_arg4 : PXSQLDA): ISC_STATUS;
1191 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1192
1193 Tisc_embed_dsql_prepare = function (status_vector : PISC_STATUS;
1194 db_handle : PISC_DB_HANDLE;
1195 tran_handle : PISC_TR_HANDLE;
1196 isc_arg4 : PByte;
1197 isc_arg5 : UShort;
1198 isc_arg6 : PByte;
1199 isc_arg7 : UShort;
1200 isc_arg8 : PXSQLDA): ISC_STATUS;
1201 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1202
1203 Tisc_embed_dsql_release = function (status_vector : PISC_STATUS;
1204 isc_arg2 : PByte): ISC_STATUS;
1205 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1206
1207 (********************************)
1208 (** Other Blob functions **)
1209 (********************************)
1210
1211 TBLOB_open = function (blob_handle : TISC_BLOB_HANDLE;
1212 isc_arg2 : PByte;
1213 isc_arg3 : int): PBSTREAM;
1214 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1215
1216 TBLOB_put = function (isc_arg1 : char;
1217 isc_arg2 : PBSTREAM): Int;
1218 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1219
1220 TBLOB_close = function (isc_arg1 : PBSTREAM): Int;
1221 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1222
1223 TBLOB_get = function (isc_arg1 : PBSTREAM): Int;
1224 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1225
1226 TBLOB_display = function (isc_arg1 : PISC_QUAD;
1227 db_handle : TISC_DB_HANDLE;
1228 tran_handle : TISC_TR_HANDLE;
1229 isc_arg4 : PByte): Int;
1230 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1231
1232 TBLOB_dump = function (isc_arg1 : PISC_QUAD;
1233 db_handle : TISC_DB_HANDLE;
1234 tran_handle : TISC_TR_HANDLE;
1235 isc_arg4 : PByte): Int;
1236 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1237
1238 TBLOB_edit = function (isc_arg1 : PISC_QUAD;
1239 db_handle : TISC_DB_HANDLE;
1240 tran_handle : TISC_TR_HANDLE;
1241 isc_arg4 : PByte): Int;
1242 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1243
1244 TBLOB_load = function (isc_arg1 : PISC_QUAD;
1245 db_handle : TISC_DB_HANDLE;
1246 tran_handle : TISC_TR_HANDLE;
1247 isc_arg4 : PByte): Int;
1248 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1249
1250 TBLOB_text_dump = function (isc_arg1 : PISC_QUAD;
1251 db_handle : TISC_DB_HANDLE;
1252 tran_handle : TISC_TR_HANDLE;
1253 isc_arg4 : PByte): Int;
1254 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1255
1256 TBLOB_text_load = function (isc_arg1 : PISC_QUAD;
1257 db_handle : TISC_DB_HANDLE;
1258 tran_handle : TISC_TR_HANDLE;
1259 isc_arg4 : PByte): Int;
1260 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1261
1262 TBopen = function (isc_arg1 : PISC_QUAD;
1263 db_handle : TISC_DB_HANDLE;
1264 tran_handle : TISC_TR_HANDLE;
1265 isc_arg4 : PByte): Int;
1266 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1267
1268 TBopen2 = function (isc_arg1 : PISC_QUAD;
1269 db_handle : TISC_DB_HANDLE;
1270 tran_handle : TISC_TR_HANDLE;
1271 isc_arg4 : PByte;
1272 isc_arg5 : UShort): PBSTREAM;
1273 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1274
1275 (********************************)
1276 (** Other Misc functions **)
1277 (********************************)
1278
1279 Tisc_ftof = function (isc_arg1 : PByte;
1280 isc_arg2 : UShort;
1281 isc_arg3 : PByte;
1282 isc_arg4 : UShort): ISC_LONG;
1283 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1284
1285 Tisc_print_blr = function (isc_arg1 : PByte;
1286 isc_arg2 : TISC_CALLBACK;
1287 isc_arg3 : PVoid;
1288 isc_arg4 : Short): ISC_STATUS;
1289 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1290
1291 Tisc_set_debug = procedure (isc_arg1 : Int);
1292 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1293
1294 Tisc_qtoq = procedure (isc_arg1 : PISC_QUAD;
1295 isc_arg2 : PISC_QUAD);
1296 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1297
1298 Tisc_vtof = procedure (isc_arg1 : PByte;
1299 isc_arg2 : PByte;
1300 isc_arg3 : UShort);
1301 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1302
1303 Tisc_vtov = procedure (isc_arg1 : PByte;
1304 isc_arg2 : PByte;
1305 isc_arg3 : Short);
1306 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1307
1308 Tisc_version = function (db_handle : PISC_DB_HANDLE;
1309 isc_arg2 : TISC_CALLBACK;
1310 isc_arg3 : PVoid): Int;
1311 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1312
1313 Tisc_reset_fpe = function (isc_arg1 : UShort): ISC_LONG;
1314 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1315
1316 (*******************************************)
1317 (** Service manager functions **)
1318 (*******************************************)
1319
1320 Tisc_service_attach = function (status_vector : PISC_STATUS;
1321 isc_arg2 : UShort;
1322 isc_arg3 : PAnsiChar;
1323 service_handle : PISC_SVC_HANDLE;
1324 isc_arg5 : UShort;
1325 isc_arg6 : PByte): ISC_STATUS;
1326 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1327
1328 Tisc_service_detach = function (status_vector : PISC_STATUS;
1329 service_handle : PISC_SVC_HANDLE): ISC_STATUS;
1330 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1331
1332 Tisc_service_query = function (status_vector : PISC_STATUS;
1333 service_handle : PISC_SVC_HANDLE;
1334 recv_handle : PISC_SVC_HANDLE;
1335 isc_arg4 : UShort;
1336 isc_arg5 : PByte;
1337 isc_arg6 : UShort;
1338 isc_arg7 : PByte;
1339 isc_arg8 : UShort;
1340 isc_arg9 : PByte): ISC_STATUS;
1341 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1342
1343 Tisc_service_start = function (status_vector : PISC_STATUS;
1344 service_handle : PISC_SVC_HANDLE;
1345 recv_handle : PISC_SVC_HANDLE;
1346 isc_arg4 : UShort;
1347 isc_arg5 : PByte): ISC_STATUS;
1348 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1349
1350 (*********************************)
1351 (** Forms functions **)
1352 (*********************************)
1353
1354 Tisc_compile_map = function (status_vector : PISC_STATUS;
1355 form_handle : PISC_FORM_HANDLE;
1356 request_handle : PISC_REQ_HANDLE;
1357 isc_arg4 : PShort;
1358 isc_arg5 : PByte): ISC_STATUS;
1359 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1360
1361 Tisc_compile_menu = function (status_vector : PISC_STATUS;
1362 form_handle : PISC_FORM_HANDLE;
1363 request_handle : PISC_REQ_HANDLE;
1364 isc_arg4 : PShort;
1365 isc_arg5 : PByte): ISC_STATUS;
1366 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1367
1368 Tisc_compile_sub_map = function (status_vector : PISC_STATUS;
1369 win_handle : PISC_WIN_HANDLE;
1370 request_handle : PISC_REQ_HANDLE;
1371 isc_arg4 : PShort;
1372 isc_arg5 : PByte): ISC_STATUS;
1373 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1374
1375 Tisc_create_window = function (status_vector : PISC_STATUS;
1376 win_handle : PISC_WIN_HANDLE;
1377 isc_arg3 : PShort;
1378 isc_arg4 : PByte;
1379 isc_arg5 : PShort;
1380 isc_arg6 : PShort): ISC_STATUS;
1381 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1382
1383 Tisc_delete_window = function (status_vector : PISC_STATUS;
1384 win_handle : PISC_WIN_HANDLE): ISC_STATUS;
1385 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1386
1387 Tisc_drive_form = function (status_vector : PISC_STATUS;
1388 db_handle : PISC_DB_HANDLE;
1389 tran_handle : PISC_TR_HANDLE;
1390 win_handle : PISC_WIN_HANDLE;
1391 request_handle : PISC_REQ_HANDLE;
1392 isc_arg6 : PUChar;
1393 isc_arg7 : PUChar): ISC_STATUS;
1394 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1395
1396 Tisc_drive_menu = function (status_vector : PISC_STATUS;
1397 win_handle : PISC_WIN_HANDLE;
1398 request_handle : PISC_REQ_HANDLE;
1399 isc_arg4 : PShort;
1400 isc_arg5 : PByte;
1401 isc_arg6 : PShort;
1402 isc_arg7 : PByte;
1403 isc_arg8 : PShort;
1404 isc_arg9 : PShort;
1405 isc_arg10 : PByte;
1406 isc_arg11 : PISC_LONG): ISC_STATUS;
1407 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1408
1409 Tisc_form_delete = function (status_vector : PISC_STATUS;
1410 form_handle : PISC_FORM_HANDLE): ISC_STATUS;
1411 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1412
1413 Tisc_form_fetch = function (status_vector : PISC_STATUS;
1414 db_handle : PISC_DB_HANDLE;
1415 tran_handle : PISC_TR_HANDLE;
1416 request_handle : PISC_REQ_HANDLE;
1417 isc_arg5 : PUChar): ISC_STATUS;
1418 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1419
1420 Tisc_form_insert = function (status_vector : PISC_STATUS;
1421 db_handle : PISC_DB_HANDLE;
1422 tran_handle : PISC_TR_HANDLE;
1423 request_handle : PISC_REQ_HANDLE;
1424 isc_arg5 : PUChar): ISC_STATUS;
1425 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1426
1427 Tisc_get_entree = function (status_vector : PISC_STATUS;
1428 request_handle : PISC_REQ_HANDLE;
1429 isc_arg3 : PShort;
1430 isc_arg4 : PByte;
1431 isc_arg5 : PISC_LONG;
1432 isc_arg6 : PShort): ISC_STATUS;
1433 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1434
1435 Tisc_initialize_menu = function (status_vector : PISC_STATUS;
1436 request_handle : PISC_REQ_HANDLE): ISC_STATUS;
1437 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1438
1439 Tisc_menu = function (status_vector : PISC_STATUS;
1440 win_handle : PISC_WIN_HANDLE;
1441 request_handle : PISC_REQ_HANDLE;
1442 isc_arg4 : PShort;
1443 isc_arg5 : PByte): ISC_STATUS;
1444 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1445
1446 Tisc_load_form = function (status_vector : PISC_STATUS;
1447 db_handle : PISC_DB_HANDLE;
1448 tran_handle : PISC_TR_HANDLE;
1449 form_handle : PISC_FORM_HANDLE;
1450 isc_arg5 : PShort;
1451 isc_arg6 : PByte): ISC_STATUS;
1452 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1453
1454 Tisc_pop_window = function (status_vector : PISC_STATUS;
1455 win_handle : PISC_WIN_HANDLE): ISC_STATUS;
1456 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1457
1458 Tisc_put_entree = function (status_vector : PISC_STATUS;
1459 request_handle : PISC_REQ_HANDLE;
1460 isc_arg3 : PShort;
1461 isc_arg4 : PByte;
1462 isc_arg5 : PISC_LONG): ISC_STATUS;
1463 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1464
1465 Tisc_reset_form = function (status_vector : PISC_STATUS;
1466 request_handle : PISC_REQ_HANDLE): ISC_STATUS;
1467 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1468
1469 Tisc_suspend_window = function (status_vector : PISC_STATUS;
1470 win_handle : PISC_WIN_HANDLE): ISC_STATUS;
1471 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1472
1473 (** Constants!!! **)
1474 (*****************************************************)
1475 (** Actions to pass to the blob filter (ctl_source) **)
1476 (*****************************************************)
1477
1478 const
1479 isc_blob_filter_open = 0;
1480 isc_blob_filter_get_segment = 1;
1481 isc_blob_filter_close = 2;
1482 isc_blob_filter_create = 3;
1483 isc_blob_filter_put_segment = 4;
1484 isc_blob_filter_alloc = 5;
1485 isc_blob_filter_free = 6;
1486 isc_blob_filter_seek = 7;
1487
1488 (*********************)
1489 (** Blr definitions **)
1490 (*********************)
1491
1492 // In pascal, how does one deal with the below "#define"?
1493 // blr_word(n) ((n) % 256), ((n) / 256)
1494 blr_text = 14;
1495 blr_text2 = 15;
1496 blr_short = 7;
1497 blr_long = 8;
1498 blr_quad = 9;
1499 blr_float = 10;
1500 blr_double = 27;
1501 blr_d_float = 11;
1502 blr_timestamp = 35;
1503 blr_varying = 37;
1504 blr_varying2 = 38;
1505 blr_blob = 261;
1506 blr_cstring = 40;
1507 blr_cstring2 = 41;
1508 blr_blob_id = 45;
1509 blr_sql_date = 12;
1510 blr_sql_time = 13;
1511 blr_int64 = 16;
1512 blr_date = blr_timestamp;
1513 blr_bool = 23;
1514
1515
1516 blr_inner = 0;
1517 blr_left = 1;
1518 blr_right = 2;
1519 blr_full = 3;
1520
1521 blr_gds_code = 0;
1522 blr_sql_code = 1;
1523 blr_exception = 2;
1524 blr_trigger_code = 3;
1525 blr_default_code = 4;
1526
1527 blr_version4 = 4;
1528 blr_version5 = 5;
1529 blr_eoc = 76;
1530 blr_end = -1;
1531
1532 blr_assignment = 1;
1533 blr_begin = 2;
1534 blr_dcl_variable = 3;
1535 blr_message = 4;
1536 blr_erase = 5;
1537 blr_fetch = 6;
1538 blr_for = 7;
1539 blr_if = 8;
1540 blr_loop = 9;
1541 blr_modify = 10;
1542 blr_handler = 11;
1543 blr_receive = 12;
1544 blr_select = 13;
1545 blr_send = 14;
1546 blr_store = 15;
1547 blr_label = 17;
1548 blr_leave = 18;
1549 blr_store2 = 19;
1550 blr_post = 20;
1551
1552 blr_literal = 21;
1553 blr_dbkey = 22;
1554 blr_field = 23;
1555 blr_fid = 24;
1556 blr_parameter = 25;
1557 blr_variable = 26;
1558 blr_average = 27;
1559 blr_count = 28;
1560 blr_maximum = 29;
1561 blr_minimum = 30;
1562 blr_total = 31;
1563 blr_add = 34;
1564 blr_subtract = 35;
1565 blr_multiply = 36;
1566 blr_divide = 37;
1567 blr_negate = 38;
1568 blr_concatenate = 39;
1569 blr_substring = 40;
1570 blr_parameter2 = 41;
1571 blr_from = 42;
1572 blr_via = 43;
1573 blr_user_name = 44;
1574 blr_null = 45;
1575
1576 blr_eql = 47;
1577 blr_neq = 48;
1578 blr_gtr = 49;
1579 blr_geq = 50;
1580 blr_lss = 51;
1581 blr_leq = 52;
1582 blr_containing = 53;
1583 blr_matching = 54;
1584 blr_starting = 55;
1585 blr_between = 56;
1586 blr_or = 57;
1587 blr_and = 58;
1588 blr_not = 59;
1589 blr_any = 60;
1590 blr_missing = 61;
1591 blr_unique = 62;
1592 blr_like = 63;
1593
1594 blr_stream = 65;
1595 blr_set_index = 66;
1596 blr_rse = 67;
1597 blr_first = 68;
1598 blr_project = 69;
1599 blr_sort = 70;
1600 blr_boolean = 71;
1601 blr_ascending = 72;
1602 blr_descending = 73;
1603 blr_relation = 74;
1604 blr_rid = 75;
1605 blr_union = 76;
1606 blr_map = 77;
1607 blr_group_by = 78;
1608 blr_aggregate = 79;
1609 blr_join_type = 80;
1610
1611 blr_agg_count = 83;
1612 blr_agg_max = 84;
1613 blr_agg_min = 85;
1614 blr_agg_total = 86;
1615 blr_agg_average = 87;
1616 blr_parameter3 = 88;
1617 blr_run_count = 118;
1618 blr_run_max = 89;
1619 blr_run_min = 90;
1620 blr_run_total = 91;
1621 blr_run_average = 92;
1622 blr_agg_count2 = 93;
1623 blr_agg_count_distinct = 94;
1624 blr_agg_total_distinct = 95;
1625 blr_agg_average_distinct = 96;
1626
1627 blr_function = 100;
1628 blr_gen_id = 101;
1629 blr_prot_mask = 102;
1630 blr_upcase = 103;
1631 blr_lock_state = 104;
1632 blr_value_if = 105;
1633 blr_matching2 = 106;
1634 blr_index = 107;
1635 blr_ansi_like = 108;
1636 blr_bookmark = 109;
1637 blr_crack = 110;
1638 blr_force_crack = 111;
1639 blr_seek = 112;
1640 blr_find = 113;
1641
1642 blr_continue = 0;
1643 blr_forward = 1;
1644 blr_backward = 2;
1645 blr_bof_forward = 3;
1646 blr_eof_backward = 4;
1647
1648 blr_lock_relation = 114;
1649 blr_lock_record = 115;
1650 blr_set_bookmark = 116;
1651 blr_get_bookmark = 117;
1652 blr_rs_stream = 119;
1653 blr_exec_proc = 120;
1654 blr_begin_range = 121;
1655 blr_end_range = 122;
1656 blr_delete_range = 123;
1657 blr_procedure = 124;
1658 blr_pid = 125;
1659 blr_exec_pid = 126;
1660 blr_singular = 127;
1661 blr_abort = 128;
1662 blr_block = 129;
1663 blr_error_handler = 130;
1664 blr_cast = 131;
1665 blr_release_lock = 132;
1666 blr_release_locks = 133;
1667 blr_start_savepoint = 134;
1668 blr_end_savepoint = 135;
1669 blr_find_dbkey = 136;
1670 blr_range_relation = 137;
1671 blr_delete_ranges = 138;
1672
1673 blr_plan = 139;
1674 blr_merge = 140;
1675 blr_join = 141;
1676 blr_sequential = 142;
1677 blr_navigational = 143;
1678 blr_indices = 144;
1679 blr_retrieve = 145;
1680
1681 blr_relation2 = 146;
1682 blr_rid2 = 147;
1683 blr_reset_stream = 148;
1684 blr_release_bookmark = 149;
1685 blr_set_generator = 150;
1686 blr_ansi_any = 151;
1687 blr_exists = 152;
1688 blr_cardinality = 153;
1689
1690 blr_record_version = 154; (** get tid of record **)
1691 blr_stall = 155; (** fake server stall **)
1692 blr_seek_no_warn = 156;
1693 blr_find_dbkey_version = 157;
1694 blr_ansi_all = 158;
1695
1696 blr_extract = 159;
1697
1698 (* sub parameters for blr_extract *)
1699
1700 blr_extract_year = 0;
1701 blr_extract_month = 1;
1702 blr_extract_day = 2;
1703 blr_extract_hour = 3;
1704 blr_extract_minute = 4;
1705 blr_extract_second = 5;
1706 blr_extract_weekday = 6;
1707 blr_extract_yearday = 7;
1708
1709 blr_current_date = 160;
1710 blr_current_timestamp = 161;
1711 blr_current_time = 162;
1712
1713 (* These verbs were added in 6.0,
1714 primarily to support 64-bit integers *)
1715
1716 blr_add2 = 163;
1717 blr_subtract2 = 164;
1718 blr_multiply2 = 165;
1719 blr_divide2 = 166;
1720 blr_agg_total2 = 167;
1721 blr_agg_total_distinct2 = 168;
1722 blr_agg_average2 = 169;
1723 blr_agg_average_distinct2 = 170;
1724 blr_average2 = 171;
1725 blr_gen_id2 = 172;
1726 blr_set_generator2 = 173;
1727
1728 (****************************************)
1729 (** Bit assignments in RDB$SYSTEM_FLAG **)
1730 (****************************************)
1731
1732 RDB_system = 1;
1733 RDB_id_assigned = 2;
1734
1735
1736 (*******************************)
1737 (** Service information items **)
1738 (*******************************)
1739
1740 {$IFDEF IB5_ONLY }
1741 (* This defines are not there in version 6.0 *)
1742 { isc_info_svc_version = 4;
1743 isc_info_svc_message = 5;
1744 isc_info_svc_total_length = 6;
1745 isc_info_svc_response = 7;
1746 isc_info_svc_response_more = 8;
1747 isc_info_svc_line = 9;
1748 isc_info_svc_to_eof = 10;
1749 isc_info_svc_timeout = 11;
1750 isc_info_svc_server_version = 12;
1751 isc_info_svc_implementation = 13;
1752 isc_info_svc_capabilities = 14;
1753 isc_info_svc_user_dbpath = 15;
1754 isc_info_svc_svr_db_info = 16;
1755 isc_info_svc_svr_online = 17;
1756 isc_info_svc_svr_offline = 18;
1757 isc_info_svc_get_config = 19;
1758 isc_info_svc_set_config = 20;
1759 isc_info_svc_default_config = 21;
1760 isc_info_svc_get_env = 22;
1761 isc_info_svc_get_env_lock = 23;
1762 isc_info_svc_get_env_msg = 24; }
1763 {$ENDIF}
1764
1765
1766
1767 (*****************)
1768 (** Error codes **)
1769 (*****************)
1770
1771 isc_facility = 20;
1772 isc_err_base = 335544320;
1773 isc_err_factor = 1;
1774 isc_arg_end = 0;
1775 isc_arg_gds = 1;
1776 isc_arg_string = 2;
1777 isc_arg_cstring = 3;
1778 isc_arg_number = 4;
1779 isc_arg_interpreted = 5;
1780 isc_arg_vms = 6;
1781 isc_arg_unix = 7;
1782 isc_arg_domain = 8;
1783 isc_arg_dos = 9;
1784 isc_arg_mpexl = 10;
1785 isc_arg_mpexl_ipc = 11;
1786 isc_arg_next_mach = 15;
1787 isc_arg_netware = 16;
1788 isc_arg_win32 = 17;
1789 isc_arg_warning = 18;
1790
1791 (**********************************************)
1792 (** International text interpretation values **)
1793 (**********************************************)
1794
1795 isc_interp_eng_ascii = 0;
1796 isc_interp_jpn_sjis = 5;
1797 isc_interp_jpn_euc = 6;
1798
1799 (******************************************)
1800 (** Scroll direction for isc_dsql_fetch2 **)
1801 (******************************************)
1802
1803 isc_fetch_next = 0;
1804 isc_fetch_prior = 1;
1805 isc_fetch_first = 2;
1806 isc_fetch_last = 3;
1807 isc_fetch_absolute = 4;
1808 isc_fetch_relative = 5;
1809
1810
1811
1812 (** XSQLDA_LENGTH is defined in C as a macro, but in Pascal we must defined it
1813 as a function... **)
1814 function XSQLDA_LENGTH(n: Long): Long;
1815
1816 implementation
1817
1818
1819 function XSQLDA_LENGTH(n: Long): Long;
1820 (* The C-macro reads like this:
1821 XSQLDA_LENGTH(n) (sizeof (XSQLDA) + (n-1) * sizeof (XSQLVAR)) *)
1822 begin
1823 result := SizeOf(TXSQLDA) + ((n - 1) * SizeOf(TXSQLVAR));
1824 end;
1825
1826
1827 end.
1828