ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/client/IBHeader.pas
Revision: 434
Committed: Wed Mar 20 11:31:00 2024 UTC (5 weeks, 4 days ago) by tony
Content type: text/x-pascal
File size: 95341 byte(s)
Log Message:
Fix legacy interface issues with FB4

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

Properties

Name Value
svn:eol-style native