ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/udr/client/IBHeader.pas
Revision: 375
Committed: Sun Jan 9 23:42:58 2022 UTC (2 years, 3 months ago) by tony
Content type: text/x-pascal
File size: 95257 byte(s)
Log Message:
Fixes

File Contents

# User Rev Content
1 tony 45 {************************************************************************}
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 tony 56 {$IFDEF MSWINDOWS}
36     {$DEFINE WINDOWS}
37     {$ENDIF}
38 tony 45
39     {$IFDEF FPC}
40 tony 56 {$mode delphi}
41     {$codepage UTF8}
42 tony 45 {$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 tony 56 PPByte = ^PByte;
103 tony 45 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 tony 47 TISC_ARRAY_DESC = record
119 tony 45 array_desc_dtype : UChar;
120 tony 56 array_desc_scale : ShortInt;
121 tony 45 array_desc_length : UShort;
122 tony 56 array_desc_field_name : array[0..31] of AnsiChar;
123     array_desc_relation_name : array[0..31] of AnsiChar;
124 tony 45 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 tony 56 blob_desc_field_name : array[0..31] of AnsiChar;
135     blob_desc_relation_name : array[0..31] of AnsiChar;
136 tony 45 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 tony 56 ctl_bpb : PByte; (** Address of blob parameter **)
156 tony 45 (** 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 tony 56 bstr_buffer : PByte; (** Address of buffer **)
170     bstr_ptr : PByte; (** Next character **)
171 tony 45 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 tony 56 sqldata : PByte;
185 tony 45 sqlind : PShort;
186     sqlname_length : Short;
187 tony 56 sqlname : array[0..29] of AnsiChar;
188 tony 45 end;
189     PSQLVAR = ^TSQLVAR;
190    
191     TSQLDA = record
192 tony 56 sqldaid : array[0..7] of AnsiChar;
193 tony 45 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 tony 56 sqldata : PByte; (** address of data **)
211 tony 45 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 tony 56 sqlname : array[0..31] of AnsiChar;
216 tony 45 relname_length : Short; (** length of relation name **)
217     (** field's relation name + space for NULL **)
218 tony 56 relname : array[0..31] of AnsiChar;
219 tony 45 ownname_length : Short; (** length of owner name **)
220     (** relation's owner name + space for NULL **)
221 tony 56 ownname : array[0..31] of AnsiChar;
222 tony 45 aliasname_length : Short; (** length of alias name **)
223     (** relation's alias name + space for NULL **)
224 tony 56 aliasname : array[0..31] of AnsiChar;
225 tony 45 end; // TXSQLVAR
226     PXSQLVAR = ^TXSQLVAR;
227    
228     TXSQLDA = record
229     version : Short; (** version of this XSQLDA **)
230     (** XSQLDA name field **)
231 tony 56 sqldaid : array[0..7] of AnsiChar;
232 tony 45 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 tony 56 tpb_address : PByte;
248 tony 45 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 tony 56 tpb_address : PByte;
258 tony 45 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 tony 56 db_name : PAnsiChar;
270 tony 45 db_handle : PISC_DB_HANDLE;
271 tony 56 parm_buffer_length : Short;
272     parm_buffer : PByte): ISC_STATUS;
273 tony 45 {$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 tony 56 isc_arg4 : PByte;
279 tony 45 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 tony 56 column_name : PAnsiChar;
296 tony 45 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 tony 56 column_name : PByte;
304 tony 45 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 tony 56 table_name : PByte;
309     column_name : PByte;
310 tony 45 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 tony 56 item_list_buffer : PByte;
342 tony 45 result_buffer_length : Short;
343 tony 56 result_buffer : PByte): ISC_STATUS;
344 tony 45 {$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 tony 56 column_name : PAnsiChar;
351 tony 45 descriptor : PISC_BLOB_DESC;
352     global : PUChar): ISC_STATUS;
353     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
354    
355     Tisc_blob_set_desc = function (status_vector : PISC_STATUS;
356     table_name,
357 tony 56 column_name : PAnsiChar;
358 tony 45 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 tony 56 bpb_address : PByte): ISC_STATUS;
399 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
400    
401     Tisc_create_database = function (status_vector : PISC_STATUS;
402     isc_arg2 : Short;
403 tony 56 isc_arg3 : PByte;
404 tony 45 db_handle : PISC_DB_HANDLE;
405     isc_arg5 : Short;
406 tony 56 isc_arg6 : PByte;
407 tony 45 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 tony 56 item_list_buffer : PByte;
414 tony 45 result_buffer_length : Short;
415 tony 56 result_buffer : PByte): ISC_STATUS;
416 tony 45 {$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 tony 56 statement : PByte;
469 tony 45 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 tony 56 statement : PAnsiChar;
494 tony 45 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 tony 56 statement : PAnsiChar;
533 tony 45 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 tony 56 cursor_name : PAnsiChar;
540 tony 45 _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 tony 56 items : PByte;
547 tony 45 buffer_length : Short;
548 tony 56 buffer : PByte): ISC_STATUS;
549 tony 45 {$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 tony 56 Tisc_event_block = function (event_buffer : PPByte;
568     result_buffer : PPByte;
569 tony 45 id_count : UShort):ISC_LONG;
570 tony 56 cdecl varargs;
571 tony 45
572     Tisc_event_counts = procedure (status_vector : PISC_LONG;
573     buffer_length : Short;
574 tony 56 event_buffer : PByte;
575     result_buffer : PByte);
576 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
577    
578 tony 56 Tisc_expand_dpb = procedure (dpb : PPByte;
579 tony 45 dpb_length : PShort;
580     item_list : array of Pointer);
581     cdecl;
582    
583 tony 56 Tisc_modify_dpb = function (dpb : PPByte;
584 tony 45 isc_arg2,
585     isc_arg3 : PShort;
586     isc_arg4 : UShort;
587 tony 56 isc_arg5 : PByte;
588 tony 45 isc_arg6 : Short): Int;
589     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
590    
591 tony 56 Tisc_free = function (isc_arg1 : PByte): ISC_LONG;
592 tony 45 {$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 tony 56 seg_buffer : PByte): ISC_STATUS;
599 tony 45 {$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 tony 56 isc_arg6 : PByte;
607 tony 45 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 tony 56 Tisc_interprete = function (buffer : PByte;
615 tony 45 status_vector : PPISC_STATUS): ISC_STATUS;
616     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
617    
618 tony 371 Tfb_interpret = function (buffer : PByte;
619     buflen : integer;
620     status_vector : PPISC_STATUS): long;
621     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
622    
623    
624 tony 45 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 tony 56 bpb_buffer : PByte): ISC_STATUS;
638 tony 45 {$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 tony 56 msg : PByte): ISC_STATUS;
644 tony 45 {$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 tony 56 seg_buffer : PByte): ISC_STATUS;
657 tony 45 {$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 tony 56 isc_arg6 : PByte;
665 tony 45 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 tony 56 event_buffer : PByte;
676 tony 45 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;
697     db_handle : PISC_DB_HANDLE;
698     tpb_length : UShort;
699 tony 56 tpb_address : PByte): ISC_STATUS;
700 tony 45 cdecl;
701    
702     Tisc_sqlcode = function (status_vector : PISC_STATUS): ISC_LONG;
703     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
704    
705    
706     Tisc_sql_interprete = procedure (sqlcode : Short;
707 tony 56 buffer : PAnsiChar;
708 tony 45 buffer_length : Short);
709     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
710    
711     Tisc_transaction_info = function (status_vector : PISC_STATUS;
712     tran_handle : PISC_TR_HANDLE;
713     item_list_buffer_length : Short;
714 tony 56 item_list_buffer : PByte;
715 tony 45 result_buffer_length : Short;
716 tony 56 result_buffer : PByte): ISC_STATUS;
717 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
718    
719     Tisc_transact_request = function (status_vector : PISC_STATUS;
720     db_handle : PISC_DB_HANDLE;
721     tran_handle : PISC_TR_HANDLE;
722     isc_arg4 : UShort;
723 tony 56 isc_arg5 : PByte;
724 tony 45 isc_arg6 : UShort;
725 tony 56 isc_arg7 : PByte;
726 tony 45 isc_arg8 : UShort;
727 tony 56 isc_arg9 : PByte): ISC_STATUS;
728 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
729    
730 tony 56 Tisc_vax_integer = function (buffer : PByte;
731 tony 45 length : Short): ISC_LONG;
732     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
733    
734 tony 56 Tisc_portable_integer = function (buffer : PByte;
735 tony 45 length : Short): ISC_INT64;
736     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
737    
738     (***************************************)
739     (** Security Functions and structures **)
740     (***************************************)
741    
742     const
743     sec_uid_spec = $01;
744     sec_gid_spec = $02;
745     sec_server_spec = $04;
746     sec_password_spec = $08;
747     sec_group_name_spec = $10;
748     sec_first_name_spec = $20;
749     sec_middle_name_spec = $40;
750     sec_last_name_spec = $80;
751     sec_dba_user_name_spec = $100;
752     sec_dba_password_spec = $200;
753    
754     sec_protocol_tcpip = 1;
755     sec_protocol_netbeui = 2;
756     sec_protocol_spx = 3;
757     sec_protocol_local = 4;
758    
759     type
760     TUserSecData = record
761     sec_flags: Short; (** which fields are specified **)
762     uid: Int; (** the user's id **)
763     gid: int; (** the user's group id **)
764     protocol: Int; (** protocol to use for connection **)
765 tony 56 server: PByte; (** server to administer **)
766     user_name: PByte; (** the user's name **)
767     password: PByte; (** the user's password **)
768     group_name: PByte; (** the group name **)
769     first_name: PByte; (** the user's first name **)
770     middle_name: PByte; (** the user's middle name **)
771     last_name: PByte; (** the user's last name **)
772     dba_user_name: PByte; (** the dba user name **)
773     dba_password: PByte; (** the dba password **)
774 tony 45 end;
775     PUserSecData = ^TUserSecData;
776    
777     Tisc_add_user = function (status_vector : PISC_STATUS;
778     user_sec_data : PUserSecData): ISC_STATUS;
779     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
780    
781     Tisc_delete_user = function (status_vector : PISC_STATUS;
782     user_sec_data : PUserSecData): ISC_STATUS;
783     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
784    
785     Tisc_modify_user = function (status_vector : PISC_STATUS;
786     user_sec_data : PUserSecData): ISC_STATUS;
787     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
788    
789     (************************************)
790     (** Other OSRI functions **)
791     (************************************)
792    
793     Tisc_compile_request = function (status_vector : PISC_STATUS;
794     db_handle : PISC_DB_HANDLE;
795     request_handle : PISC_REQ_HANDLE;
796     isc_arg4 : Short;
797 tony 56 isc_arg5 : PByte): ISC_STATUS;
798 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
799    
800     Tisc_compile_request2 = function (status_vector : PISC_STATUS;
801     db_handle : PISC_DB_HANDLE;
802     request_handle : PISC_REQ_HANDLE;
803     isc_arg4 : Short;
804 tony 56 isc_arg5 : PByte): ISC_STATUS;
805 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
806    
807     Tisc_ddl = function (status_vector : PISC_STATUS;
808     db_handle : PISC_DB_HANDLE;
809     tran_handle : PISC_TR_HANDLE;
810     isc_arg4 : Short;
811 tony 56 isc_arg5 : PByte): ISC_STATUS;
812 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
813    
814     Tisc_prepare_transaction = function (status_vector : PISC_STATUS;
815     tran_handle : PISC_TR_HANDLE): ISC_STATUS;
816     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
817    
818    
819     Tisc_receive = function (status_vector : PISC_STATUS;
820     request_handle : PISC_REQ_HANDLE;
821     isc_arg3,
822     isc_arg4 : Short;
823     isc_arg5 : PVoid;
824     isc_arg6 : Short): ISC_STATUS;
825     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
826    
827     Tisc_receive2 = function (status_vector : PISC_STATUS;
828     request_handle : PISC_REQ_HANDLE;
829     isc_arg3,
830     isc_arg4 : Short;
831     isc_arg5 : PVoid;
832     isc_arg6,
833     isc_arg7 : Short;
834     isc_arg8 : Long): ISC_STATUS;
835     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
836    
837     Tisc_reconnect_transaction = function (status_vector : PISC_STATUS;
838     db_handle : PISC_DB_HANDLE;
839     tran_handle : PISC_TR_HANDLE;
840     isc_arg4 : Short;
841 tony 56 isc_arg5 : PByte): ISC_STATUS;
842 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
843    
844     Tisc_release_request = function (status_vector : PISC_STATUS;
845     request_handle : PISC_REQ_HANDLE): ISC_STATUS;
846     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
847    
848     Tisc_request_info = function (status_vector : PISC_STATUS;
849     request_handle : PISC_REQ_HANDLE;
850     isc_arg3 : Short;
851     isc_arg4 : Short;
852 tony 56 isc_arg5 : PByte;
853 tony 45 isc_arg6 : Short;
854 tony 56 isc_arg7 : PByte): ISC_STATUS;
855 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
856    
857     Tisc_seek_blob = function (status_vector : PISC_STATUS;
858     blob_handle : PISC_BLOB_HANDLE;
859     isc_arg3 : Short;
860     isc_arg4 : ISC_LONG;
861     isc_arg5 : PISC_LONG): ISC_STATUS;
862     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
863    
864     Tisc_send = function (status_vector : PISC_STATUS;
865     request_handle : PISC_REQ_HANDLE;
866     isc_arg3,
867     isc_arg4 : Short;
868     isc_arg5 : PVoid;
869     isc_arg6 : Short): ISC_STATUS;
870     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
871    
872     Tisc_start_and_send = function (status_vector : PISC_STATUS;
873     request_handle : PISC_REQ_HANDLE;
874     tran_handle : PISC_TR_HANDLE;
875     isc_arg4,
876     isc_arg5 : Short;
877     isc_arg6 : PVoid;
878     isc_arg7 : Short): ISC_STATUS;
879     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
880    
881     Tisc_start_request = function (status_vector : PISC_STATUS;
882     request_handle : PISC_REQ_HANDLE;
883     tran_handle : PISC_TR_HANDLE;
884     isc_arg4 : Short): ISC_STATUS;
885     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
886    
887     Tisc_unwind_request = function (status_vector : PISC_STATUS;
888     tran_handle : PISC_TR_HANDLE;
889     isc_arg3 : Short): ISC_STATUS;
890     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
891    
892     Tisc_wait_for_event = function (status_vector : PISC_STATUS;
893     db_handle : PISC_DB_HANDLE;
894     length : Short;
895     event_buffer,
896 tony 56 result_buffer : PByte): ISC_STATUS;
897 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
898    
899     (*******************************)
900     (** Other Sql functions **)
901     (*******************************)
902     {$IFDEF IB5_ONLY}
903     Tisc_close = function (status_vector : PISC_STATUS;
904 tony 56 isc_arg2 : PByte): ISC_STATUS;
905 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
906    
907     Tisc_declare = function (status_vector : PISC_STATUS;
908     isc_arg2,
909 tony 56 isc_arg3 : PByte): ISC_STATUS;
910 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
911    
912     Tisc_describe = function (status_vector : PISC_STATUS;
913 tony 56 isc_arg2 : PByte;
914 tony 45 isc_arg3 : PSQLDA): ISC_STATUS;
915     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
916    
917     Tisc_describe_bind = function (status_vector : PISC_STATUS;
918 tony 56 isc_arg2 : PByte;
919 tony 45 isc_arg3 : PSQLDA): ISC_STATUS;
920     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
921    
922     Tisc_execute = function (status_vector : PISC_STATUS;
923     tran_handle : PISC_TR_HANDLE;
924 tony 56 isc_arg3 : PByte;
925 tony 45 isc_arg4 : PSQLDA): ISC_STATUS;
926     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
927    
928     Tisc_execute_immediate = function (status_vector : PISC_STATUS;
929     db_handle : PISC_DB_HANDLE;
930     tran_handle : PISC_TR_HANDLE;
931     isc_arg4 : PShort;
932 tony 56 isc_arg5 : PByte): ISC_STATUS;
933 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
934    
935     Tisc_fetch = function (status_vector : PISC_STATUS;
936 tony 56 isc_arg2 : PByte;
937 tony 45 isc_arg3 : PSQLDA): ISC_STATUS;
938     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
939    
940     Tisc_open = function (status_vector : PISC_STATUS;
941     tran_handle : PISC_TR_HANDLE;
942 tony 56 isc_arg3 : PByte;
943 tony 45 isc_arg4 : PSQLDA): ISC_STATUS;
944     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
945    
946     Tisc_prepare = function (status_vector : PISC_STATUS;
947     db_handle : PISC_DB_HANDLE;
948     tran_handle : PISC_TR_HANDLE;
949 tony 56 isc_arg4 : PByte;
950 tony 45 isc_arg5 : PShort;
951 tony 56 isc_arg6 : PByte;
952 tony 45 isc_arg7 : PSQLDA): ISC_STATUS;
953     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
954     {$ELSE}
955     Tisc_close = function (status_vector : PISC_STATUS;
956 tony 56 isc_arg2 : PByte): ISC_STATUS;
957 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
958    
959     Tisc_declare = function (status_vector : PISC_STATUS;
960     isc_arg2,
961 tony 56 isc_arg3 : PByte): ISC_STATUS;
962 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
963    
964     Tisc_describe = function (status_vector : PISC_STATUS;
965 tony 56 isc_arg2 : PByte;
966 tony 45 isc_arg3 : PXSQLDA): ISC_STATUS;
967     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
968    
969     Tisc_describe_bind = function (status_vector : PISC_STATUS;
970 tony 56 isc_arg2 : PByte;
971 tony 45 isc_arg3 : PXSQLDA): ISC_STATUS;
972     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
973    
974     Tisc_execute = function (status_vector : PISC_STATUS;
975     tran_handle : PISC_TR_HANDLE;
976 tony 56 isc_arg3 : PByte;
977 tony 45 isc_arg4 : PXSQLDA): ISC_STATUS;
978     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
979    
980     Tisc_execute_immediate = function (status_vector : PISC_STATUS;
981     db_handle : PISC_DB_HANDLE;
982     tran_handle : PISC_TR_HANDLE;
983     isc_arg4 : PShort;
984 tony 56 isc_arg5 : PByte): ISC_STATUS;
985 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
986    
987     Tisc_fetch = function (status_vector : PISC_STATUS;
988 tony 56 isc_arg2 : PByte;
989 tony 45 isc_arg3 : PXSQLDA): ISC_STATUS;
990     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
991    
992     Tisc_open = function (status_vector : PISC_STATUS;
993     tran_handle : PISC_TR_HANDLE;
994 tony 56 isc_arg3 : PByte;
995 tony 45 isc_arg4 : PXSQLDA): ISC_STATUS;
996     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
997    
998     Tisc_prepare = function (status_vector : PISC_STATUS;
999     db_handle : PISC_DB_HANDLE;
1000     tran_handle : PISC_TR_HANDLE;
1001 tony 56 isc_arg4 : PByte;
1002 tony 45 isc_arg5 : PShort;
1003 tony 56 isc_arg6 : PByte;
1004 tony 45 isc_arg7 : PXSQLDA): ISC_STATUS;
1005     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1006     {$ENDIF}
1007    
1008     (***************************************)
1009     (** Other Dynamic sql functions **)
1010     (***************************************)
1011    
1012     Tisc_dsql_execute_m = function (status_vector : PISC_STATUS;
1013     tran_handle : PISC_TR_HANDLE;
1014     statement_handle : PISC_STMT_HANDLE;
1015     isc_arg4 : UShort;
1016 tony 56 isc_arg5 : PByte;
1017 tony 45 isc_arg6 : UShort;
1018     isc_arg7 : UShort;
1019 tony 56 isc_arg8 : PByte): ISC_STATUS;
1020 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1021    
1022     Tisc_dsql_execute2_m = function (status_vector : PISC_STATUS;
1023     tran_handle : PISC_TR_HANDLE;
1024     statement_handle : PISC_STMT_HANDLE;
1025     isc_arg4 : UShort;
1026 tony 56 isc_arg5 : PByte;
1027 tony 45 isc_arg6 : UShort;
1028     isc_arg7 : UShort;
1029 tony 56 isc_arg8 : PByte;
1030 tony 45 isc_arg9 : UShort;
1031 tony 56 isc_arg10 : PByte;
1032 tony 45 isc_arg11 : UShort;
1033     isc_arg12 : UShort;
1034 tony 56 isc_arg13 : PByte): ISC_STATUS;
1035 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1036    
1037     Tisc_dsql_execute_immediate_m = function (status_vector : PISC_STATUS;
1038     db_handle : PISC_DB_HANDLE;
1039     tran_handle : PISC_TR_HANDLE;
1040     isc_arg4 : UShort;
1041 tony 56 isc_arg5 : PByte;
1042 tony 45 isc_arg6 : UShort;
1043     isc_arg7 : UShort;
1044 tony 56 isc_arg8 : PByte;
1045 tony 45 isc_arg9 : UShort;
1046     isc_arg10 : UShort;
1047 tony 56 isc_arg11 : PByte): ISC_STATUS;
1048 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1049    
1050     Tisc_dsql_exec_immed3_m = function (status_vector : PISC_STATUS;
1051     db_handle : PISC_DB_HANDLE;
1052     tran_handle : PISC_TR_HANDLE;
1053     isc_arg4 : UShort;
1054 tony 56 isc_arg5 : PByte;
1055 tony 45 isc_arg6 : UShort;
1056     isc_arg7 : UShort;
1057 tony 56 isc_arg8 : PByte;
1058 tony 45 isc_arg9 : UShort;
1059     isc_arg10 : UShort;
1060 tony 56 isc_arg11 : PByte;
1061 tony 45 isc_arg12 : UShort;
1062 tony 56 isc_arg13 : PByte;
1063 tony 45 isc_arg14 : UShort;
1064     isc_arg15 : UShort;
1065 tony 56 isc_arg16 : PByte): ISC_STATUS;
1066 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1067    
1068     Tisc_dsql_fetch_m = function (status_vector : PISC_STATUS;
1069     statement_handle : PISC_STMT_HANDLE;
1070     isc_arg3 : UShort;
1071 tony 56 isc_arg4 : PByte;
1072 tony 45 isc_arg5 : UShort;
1073     isc_arg6 : UShort;
1074 tony 56 isc_arg7 : PByte): ISC_STATUS;
1075 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1076    
1077     (*$ifdef SCROLLABLE_CURSORS*)
1078     Tisc_dsql_fetch2_m = function (status_vector : PISC_STATUS;
1079     statement_handle : PISC_STMT_HANDLE;
1080     isc_arg3 : UShort;
1081 tony 56 isc_arg4 : PByte;
1082 tony 45 isc_arg5 : UShort;
1083     isc_arg6 : UShort;
1084 tony 56 isc_arg7 : PByte;
1085 tony 45 isc_arg8 : UShort;
1086     isc_arg9 : Long): ISC_STATUS;
1087     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1088     (*$endif*)
1089    
1090     Tisc_dsql_insert_m = function (status_vector : PISC_STATUS;
1091     statement_handle : PISC_STMT_HANDLE;
1092     isc_arg3 : UShort;
1093 tony 56 isc_arg4 : PByte;
1094 tony 45 isc_arg5 : UShort;
1095     isc_arg6 : UShort;
1096 tony 56 isc_arg7 : PByte): ISC_STATUS;
1097 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1098    
1099     Tisc_dsql_prepare_m = function (status_vector : PISC_STATUS;
1100     tran_handle : PISC_TR_HANDLE;
1101     statement_handle : PISC_STMT_HANDLE;
1102     isc_arg4 : UShort;
1103 tony 56 isc_arg5 : PByte;
1104 tony 45 isc_arg6 : UShort;
1105     isc_arg7 : UShort;
1106 tony 56 isc_arg8 : PByte;
1107 tony 45 isc_arg9 : UShort;
1108 tony 56 isc_arg10 : PByte): ISC_STATUS;
1109 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1110    
1111     Tisc_dsql_release = function (status_vector : PISC_STATUS;
1112 tony 56 isc_arg2 : PByte): ISC_STATUS;
1113 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1114    
1115     Tisc_embed_dsql_close = function(status_vector : PISC_STATUS;
1116 tony 56 isc_arg2 : PByte): ISC_STATUS;
1117 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1118    
1119     Tisc_embed_dsql_declare = function (status_vector : PISC_STATUS;
1120 tony 56 isc_arg2 : PByte;
1121     isc_arg3 : PByte): ISC_STATUS;
1122 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1123    
1124     Tisc_embed_dsql_describe = function (status_vector : PISC_STATUS;
1125 tony 56 isc_arg2 : PByte;
1126 tony 45 isc_arg3 : UShort;
1127     isc_arg4 : PXSQLDA): ISC_STATUS;
1128     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1129    
1130     Tisc_embed_dsql_describe_bind = function (status_vector : PISC_STATUS;
1131 tony 56 isc_arg2 : PByte;
1132 tony 45 isc_arg3 : UShort;
1133     isc_arg4 : PXSQLDA): ISC_STATUS;
1134     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1135    
1136     Tisc_embed_dsql_execute = function (status_vector : PISC_STATUS;
1137     tran_handle : PISC_TR_HANDLE;
1138 tony 56 isc_arg3 : PByte;
1139 tony 45 isc_arg4 : UShort;
1140     isc_arg5 : PXSQLDA): ISC_STATUS;
1141     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1142    
1143     Tisc_embed_dsql_execute2 = function (status_vector : PISC_STATUS;
1144     tran_handle : PISC_TR_HANDLE;
1145 tony 56 isc_arg3 : PByte;
1146 tony 45 isc_arg4 : UShort;
1147     isc_arg5 : PXSQLDA;
1148     isc_arg6 : PXSQLDA): ISC_STATUS;
1149     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1150    
1151     Tisc_embed_dsql_execute_immed = function (status_vector : PISC_STATUS;
1152     db_handle : PISC_DB_HANDLE;
1153     tran_handle : PISC_TR_HANDLE;
1154     isc_arg4 : UShort;
1155 tony 56 isc_arg5 : PByte;
1156 tony 45 isc_arg6 : UShort;
1157     isc_arg7 : PXSQLDA): ISC_STATUS;
1158     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1159    
1160     Tisc_embed_dsql_fetch = function(status_vector : PISC_STATUS;
1161 tony 56 isc_arg2 : PByte;
1162 tony 45 isc_arg3 : UShort;
1163     isc_arg4 : PXSQLDA): ISC_STATUS;
1164     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1165    
1166     (*$ifdef SCROLLABLE_CURSORS*)
1167     Tisc_embed_dsql_fetch2 = function (status_vector : PISC_STATUS;
1168 tony 56 isc_arg2 : PByte;
1169 tony 45 isc_arg3 : UShort;
1170     isc_arg4 : PXSQLDA;
1171     isc_arg5 : UShort;
1172     isc_arg6 : Long): ISC_STATUS;
1173     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1174     (*$endif*)
1175    
1176     Tisc_embed_dsql_open = function (status_vector : PISC_STATUS;
1177     tran_handle : PISC_TR_HANDLE;
1178 tony 56 isc_arg3 : PByte;
1179 tony 45 isc_arg4 : UShort;
1180     isc_arg5 : PXSQLDA): ISC_STATUS;
1181     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1182    
1183     Tisc_embed_dsql_open2 = function (status_vector : PISC_STATUS;
1184     tran_handle : PISC_TR_HANDLE;
1185 tony 56 isc_arg3 : PByte;
1186 tony 45 isc_arg4 : UShort;
1187     isc_arg5 : PXSQLDA;
1188     isc_arg6 : PXSQLDA): ISC_STATUS;
1189     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1190    
1191     Tisc_embed_dsql_insert = function (status_vector : PISC_STATUS;
1192 tony 56 isc_arg2 : PByte;
1193 tony 45 isc_arg3 : UShort;
1194     isc_arg4 : PXSQLDA): ISC_STATUS;
1195     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1196    
1197     Tisc_embed_dsql_prepare = function (status_vector : PISC_STATUS;
1198     db_handle : PISC_DB_HANDLE;
1199     tran_handle : PISC_TR_HANDLE;
1200 tony 56 isc_arg4 : PByte;
1201 tony 45 isc_arg5 : UShort;
1202 tony 56 isc_arg6 : PByte;
1203 tony 45 isc_arg7 : UShort;
1204     isc_arg8 : PXSQLDA): ISC_STATUS;
1205     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1206    
1207     Tisc_embed_dsql_release = function (status_vector : PISC_STATUS;
1208 tony 56 isc_arg2 : PByte): ISC_STATUS;
1209 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1210    
1211     (********************************)
1212     (** Other Blob functions **)
1213     (********************************)
1214    
1215     TBLOB_open = function (blob_handle : TISC_BLOB_HANDLE;
1216 tony 56 isc_arg2 : PByte;
1217 tony 45 isc_arg3 : int): PBSTREAM;
1218     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1219    
1220     TBLOB_put = function (isc_arg1 : char;
1221     isc_arg2 : PBSTREAM): Int;
1222     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1223    
1224     TBLOB_close = function (isc_arg1 : PBSTREAM): Int;
1225     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1226    
1227     TBLOB_get = function (isc_arg1 : PBSTREAM): Int;
1228     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1229    
1230     TBLOB_display = function (isc_arg1 : PISC_QUAD;
1231     db_handle : TISC_DB_HANDLE;
1232     tran_handle : TISC_TR_HANDLE;
1233 tony 56 isc_arg4 : PByte): Int;
1234 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1235    
1236     TBLOB_dump = function (isc_arg1 : PISC_QUAD;
1237     db_handle : TISC_DB_HANDLE;
1238     tran_handle : TISC_TR_HANDLE;
1239 tony 56 isc_arg4 : PByte): Int;
1240 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1241    
1242     TBLOB_edit = function (isc_arg1 : PISC_QUAD;
1243     db_handle : TISC_DB_HANDLE;
1244     tran_handle : TISC_TR_HANDLE;
1245 tony 56 isc_arg4 : PByte): Int;
1246 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1247    
1248     TBLOB_load = function (isc_arg1 : PISC_QUAD;
1249     db_handle : TISC_DB_HANDLE;
1250     tran_handle : TISC_TR_HANDLE;
1251 tony 56 isc_arg4 : PByte): Int;
1252 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1253    
1254     TBLOB_text_dump = function (isc_arg1 : PISC_QUAD;
1255     db_handle : TISC_DB_HANDLE;
1256     tran_handle : TISC_TR_HANDLE;
1257 tony 56 isc_arg4 : PByte): Int;
1258 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1259    
1260     TBLOB_text_load = function (isc_arg1 : PISC_QUAD;
1261     db_handle : TISC_DB_HANDLE;
1262     tran_handle : TISC_TR_HANDLE;
1263 tony 56 isc_arg4 : PByte): Int;
1264 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1265    
1266     TBopen = function (isc_arg1 : PISC_QUAD;
1267     db_handle : TISC_DB_HANDLE;
1268     tran_handle : TISC_TR_HANDLE;
1269 tony 56 isc_arg4 : PByte): Int;
1270 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1271    
1272     TBopen2 = function (isc_arg1 : PISC_QUAD;
1273     db_handle : TISC_DB_HANDLE;
1274     tran_handle : TISC_TR_HANDLE;
1275 tony 56 isc_arg4 : PByte;
1276 tony 45 isc_arg5 : UShort): PBSTREAM;
1277     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1278    
1279     (********************************)
1280     (** Other Misc functions **)
1281     (********************************)
1282    
1283 tony 56 Tisc_ftof = function (isc_arg1 : PByte;
1284 tony 45 isc_arg2 : UShort;
1285 tony 56 isc_arg3 : PByte;
1286 tony 45 isc_arg4 : UShort): ISC_LONG;
1287     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1288    
1289 tony 56 Tisc_print_blr = function (isc_arg1 : PByte;
1290 tony 45 isc_arg2 : TISC_CALLBACK;
1291     isc_arg3 : PVoid;
1292     isc_arg4 : Short): ISC_STATUS;
1293     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1294    
1295     Tisc_set_debug = procedure (isc_arg1 : Int);
1296     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1297    
1298     Tisc_qtoq = procedure (isc_arg1 : PISC_QUAD;
1299     isc_arg2 : PISC_QUAD);
1300     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1301    
1302 tony 56 Tisc_vtof = procedure (isc_arg1 : PByte;
1303     isc_arg2 : PByte;
1304 tony 45 isc_arg3 : UShort);
1305     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1306    
1307 tony 56 Tisc_vtov = procedure (isc_arg1 : PByte;
1308     isc_arg2 : PByte;
1309 tony 45 isc_arg3 : Short);
1310     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1311    
1312     Tisc_version = function (db_handle : PISC_DB_HANDLE;
1313     isc_arg2 : TISC_CALLBACK;
1314     isc_arg3 : PVoid): Int;
1315     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1316    
1317     Tisc_reset_fpe = function (isc_arg1 : UShort): ISC_LONG;
1318     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1319    
1320     (*******************************************)
1321     (** Service manager functions **)
1322     (*******************************************)
1323    
1324     Tisc_service_attach = function (status_vector : PISC_STATUS;
1325     isc_arg2 : UShort;
1326 tony 56 isc_arg3 : PAnsiChar;
1327 tony 45 service_handle : PISC_SVC_HANDLE;
1328     isc_arg5 : UShort;
1329 tony 56 isc_arg6 : PByte): ISC_STATUS;
1330 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1331    
1332     Tisc_service_detach = function (status_vector : PISC_STATUS;
1333     service_handle : PISC_SVC_HANDLE): ISC_STATUS;
1334     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1335    
1336     Tisc_service_query = function (status_vector : PISC_STATUS;
1337     service_handle : PISC_SVC_HANDLE;
1338     recv_handle : PISC_SVC_HANDLE;
1339     isc_arg4 : UShort;
1340 tony 56 isc_arg5 : PByte;
1341 tony 45 isc_arg6 : UShort;
1342 tony 56 isc_arg7 : PByte;
1343 tony 45 isc_arg8 : UShort;
1344 tony 56 isc_arg9 : PByte): ISC_STATUS;
1345 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1346    
1347     Tisc_service_start = function (status_vector : PISC_STATUS;
1348     service_handle : PISC_SVC_HANDLE;
1349     recv_handle : PISC_SVC_HANDLE;
1350     isc_arg4 : UShort;
1351 tony 56 isc_arg5 : PByte): ISC_STATUS;
1352 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1353    
1354     (*********************************)
1355     (** Forms functions **)
1356     (*********************************)
1357    
1358     Tisc_compile_map = function (status_vector : PISC_STATUS;
1359     form_handle : PISC_FORM_HANDLE;
1360     request_handle : PISC_REQ_HANDLE;
1361     isc_arg4 : PShort;
1362 tony 56 isc_arg5 : PByte): ISC_STATUS;
1363 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1364    
1365     Tisc_compile_menu = function (status_vector : PISC_STATUS;
1366     form_handle : PISC_FORM_HANDLE;
1367     request_handle : PISC_REQ_HANDLE;
1368     isc_arg4 : PShort;
1369 tony 56 isc_arg5 : PByte): ISC_STATUS;
1370 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1371    
1372     Tisc_compile_sub_map = function (status_vector : PISC_STATUS;
1373     win_handle : PISC_WIN_HANDLE;
1374     request_handle : PISC_REQ_HANDLE;
1375     isc_arg4 : PShort;
1376 tony 56 isc_arg5 : PByte): ISC_STATUS;
1377 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1378    
1379     Tisc_create_window = function (status_vector : PISC_STATUS;
1380     win_handle : PISC_WIN_HANDLE;
1381     isc_arg3 : PShort;
1382 tony 56 isc_arg4 : PByte;
1383 tony 45 isc_arg5 : PShort;
1384     isc_arg6 : PShort): ISC_STATUS;
1385     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1386    
1387     Tisc_delete_window = function (status_vector : PISC_STATUS;
1388     win_handle : PISC_WIN_HANDLE): ISC_STATUS;
1389     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1390    
1391     Tisc_drive_form = function (status_vector : PISC_STATUS;
1392     db_handle : PISC_DB_HANDLE;
1393     tran_handle : PISC_TR_HANDLE;
1394     win_handle : PISC_WIN_HANDLE;
1395     request_handle : PISC_REQ_HANDLE;
1396     isc_arg6 : PUChar;
1397     isc_arg7 : PUChar): ISC_STATUS;
1398     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1399    
1400     Tisc_drive_menu = function (status_vector : PISC_STATUS;
1401     win_handle : PISC_WIN_HANDLE;
1402     request_handle : PISC_REQ_HANDLE;
1403     isc_arg4 : PShort;
1404 tony 56 isc_arg5 : PByte;
1405 tony 45 isc_arg6 : PShort;
1406 tony 56 isc_arg7 : PByte;
1407 tony 45 isc_arg8 : PShort;
1408     isc_arg9 : PShort;
1409 tony 56 isc_arg10 : PByte;
1410 tony 45 isc_arg11 : PISC_LONG): ISC_STATUS;
1411     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1412    
1413     Tisc_form_delete = function (status_vector : PISC_STATUS;
1414     form_handle : PISC_FORM_HANDLE): ISC_STATUS;
1415     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1416    
1417     Tisc_form_fetch = function (status_vector : PISC_STATUS;
1418     db_handle : PISC_DB_HANDLE;
1419     tran_handle : PISC_TR_HANDLE;
1420     request_handle : PISC_REQ_HANDLE;
1421     isc_arg5 : PUChar): ISC_STATUS;
1422     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1423    
1424     Tisc_form_insert = function (status_vector : PISC_STATUS;
1425     db_handle : PISC_DB_HANDLE;
1426     tran_handle : PISC_TR_HANDLE;
1427     request_handle : PISC_REQ_HANDLE;
1428     isc_arg5 : PUChar): ISC_STATUS;
1429     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1430    
1431     Tisc_get_entree = function (status_vector : PISC_STATUS;
1432     request_handle : PISC_REQ_HANDLE;
1433     isc_arg3 : PShort;
1434 tony 56 isc_arg4 : PByte;
1435 tony 45 isc_arg5 : PISC_LONG;
1436     isc_arg6 : PShort): ISC_STATUS;
1437     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1438    
1439     Tisc_initialize_menu = function (status_vector : PISC_STATUS;
1440     request_handle : PISC_REQ_HANDLE): ISC_STATUS;
1441     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1442    
1443     Tisc_menu = function (status_vector : PISC_STATUS;
1444     win_handle : PISC_WIN_HANDLE;
1445     request_handle : PISC_REQ_HANDLE;
1446     isc_arg4 : PShort;
1447 tony 56 isc_arg5 : PByte): ISC_STATUS;
1448 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1449    
1450     Tisc_load_form = function (status_vector : PISC_STATUS;
1451     db_handle : PISC_DB_HANDLE;
1452     tran_handle : PISC_TR_HANDLE;
1453     form_handle : PISC_FORM_HANDLE;
1454     isc_arg5 : PShort;
1455 tony 56 isc_arg6 : PByte): ISC_STATUS;
1456 tony 45 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1457    
1458     Tisc_pop_window = function (status_vector : PISC_STATUS;
1459     win_handle : PISC_WIN_HANDLE): ISC_STATUS;
1460     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1461    
1462     Tisc_put_entree = function (status_vector : PISC_STATUS;
1463     request_handle : PISC_REQ_HANDLE;
1464     isc_arg3 : PShort;
1465 tony 56 isc_arg4 : PByte;
1466 tony 45 isc_arg5 : PISC_LONG): ISC_STATUS;
1467     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1468    
1469     Tisc_reset_form = function (status_vector : PISC_STATUS;
1470     request_handle : PISC_REQ_HANDLE): ISC_STATUS;
1471     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1472    
1473     Tisc_suspend_window = function (status_vector : PISC_STATUS;
1474     win_handle : PISC_WIN_HANDLE): ISC_STATUS;
1475     {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
1476    
1477     (** Constants!!! **)
1478     (*****************************************************)
1479     (** Actions to pass to the blob filter (ctl_source) **)
1480     (*****************************************************)
1481    
1482     const
1483     isc_blob_filter_open = 0;
1484     isc_blob_filter_get_segment = 1;
1485     isc_blob_filter_close = 2;
1486     isc_blob_filter_create = 3;
1487     isc_blob_filter_put_segment = 4;
1488     isc_blob_filter_alloc = 5;
1489     isc_blob_filter_free = 6;
1490     isc_blob_filter_seek = 7;
1491    
1492     (*********************)
1493     (** Blr definitions **)
1494     (*********************)
1495    
1496     // In pascal, how does one deal with the below "#define"?
1497     // blr_word(n) ((n) % 256), ((n) / 256)
1498     blr_text = 14;
1499     blr_text2 = 15;
1500     blr_short = 7;
1501     blr_long = 8;
1502     blr_quad = 9;
1503     blr_float = 10;
1504     blr_double = 27;
1505     blr_d_float = 11;
1506     blr_timestamp = 35;
1507     blr_varying = 37;
1508     blr_varying2 = 38;
1509     blr_blob = 261;
1510     blr_cstring = 40;
1511     blr_cstring2 = 41;
1512     blr_blob_id = 45;
1513     blr_sql_date = 12;
1514     blr_sql_time = 13;
1515     blr_int64 = 16;
1516     blr_date = blr_timestamp;
1517     blr_bool = 23;
1518    
1519    
1520     blr_inner = 0;
1521     blr_left = 1;
1522     blr_right = 2;
1523     blr_full = 3;
1524    
1525     blr_gds_code = 0;
1526     blr_sql_code = 1;
1527     blr_exception = 2;
1528     blr_trigger_code = 3;
1529     blr_default_code = 4;
1530    
1531     blr_version4 = 4;
1532     blr_version5 = 5;
1533     blr_eoc = 76;
1534     blr_end = -1;
1535    
1536     blr_assignment = 1;
1537     blr_begin = 2;
1538     blr_dcl_variable = 3;
1539     blr_message = 4;
1540     blr_erase = 5;
1541     blr_fetch = 6;
1542     blr_for = 7;
1543     blr_if = 8;
1544     blr_loop = 9;
1545     blr_modify = 10;
1546     blr_handler = 11;
1547     blr_receive = 12;
1548     blr_select = 13;
1549     blr_send = 14;
1550     blr_store = 15;
1551     blr_label = 17;
1552     blr_leave = 18;
1553     blr_store2 = 19;
1554     blr_post = 20;
1555    
1556     blr_literal = 21;
1557     blr_dbkey = 22;
1558     blr_field = 23;
1559     blr_fid = 24;
1560     blr_parameter = 25;
1561     blr_variable = 26;
1562     blr_average = 27;
1563     blr_count = 28;
1564     blr_maximum = 29;
1565     blr_minimum = 30;
1566     blr_total = 31;
1567     blr_add = 34;
1568     blr_subtract = 35;
1569     blr_multiply = 36;
1570     blr_divide = 37;
1571     blr_negate = 38;
1572     blr_concatenate = 39;
1573     blr_substring = 40;
1574     blr_parameter2 = 41;
1575     blr_from = 42;
1576     blr_via = 43;
1577     blr_user_name = 44;
1578     blr_null = 45;
1579    
1580     blr_eql = 47;
1581     blr_neq = 48;
1582     blr_gtr = 49;
1583     blr_geq = 50;
1584     blr_lss = 51;
1585     blr_leq = 52;
1586     blr_containing = 53;
1587     blr_matching = 54;
1588     blr_starting = 55;
1589     blr_between = 56;
1590     blr_or = 57;
1591     blr_and = 58;
1592     blr_not = 59;
1593     blr_any = 60;
1594     blr_missing = 61;
1595     blr_unique = 62;
1596     blr_like = 63;
1597    
1598     blr_stream = 65;
1599     blr_set_index = 66;
1600     blr_rse = 67;
1601     blr_first = 68;
1602     blr_project = 69;
1603     blr_sort = 70;
1604     blr_boolean = 71;
1605     blr_ascending = 72;
1606     blr_descending = 73;
1607     blr_relation = 74;
1608     blr_rid = 75;
1609     blr_union = 76;
1610     blr_map = 77;
1611     blr_group_by = 78;
1612     blr_aggregate = 79;
1613     blr_join_type = 80;
1614    
1615     blr_agg_count = 83;
1616     blr_agg_max = 84;
1617     blr_agg_min = 85;
1618     blr_agg_total = 86;
1619     blr_agg_average = 87;
1620     blr_parameter3 = 88;
1621     blr_run_count = 118;
1622     blr_run_max = 89;
1623     blr_run_min = 90;
1624     blr_run_total = 91;
1625     blr_run_average = 92;
1626     blr_agg_count2 = 93;
1627     blr_agg_count_distinct = 94;
1628     blr_agg_total_distinct = 95;
1629     blr_agg_average_distinct = 96;
1630    
1631     blr_function = 100;
1632     blr_gen_id = 101;
1633     blr_prot_mask = 102;
1634     blr_upcase = 103;
1635     blr_lock_state = 104;
1636     blr_value_if = 105;
1637     blr_matching2 = 106;
1638     blr_index = 107;
1639     blr_ansi_like = 108;
1640     blr_bookmark = 109;
1641     blr_crack = 110;
1642     blr_force_crack = 111;
1643     blr_seek = 112;
1644     blr_find = 113;
1645    
1646     blr_continue = 0;
1647     blr_forward = 1;
1648     blr_backward = 2;
1649     blr_bof_forward = 3;
1650     blr_eof_backward = 4;
1651    
1652     blr_lock_relation = 114;
1653     blr_lock_record = 115;
1654     blr_set_bookmark = 116;
1655     blr_get_bookmark = 117;
1656     blr_rs_stream = 119;
1657     blr_exec_proc = 120;
1658     blr_begin_range = 121;
1659     blr_end_range = 122;
1660     blr_delete_range = 123;
1661     blr_procedure = 124;
1662     blr_pid = 125;
1663     blr_exec_pid = 126;
1664     blr_singular = 127;
1665     blr_abort = 128;
1666     blr_block = 129;
1667     blr_error_handler = 130;
1668     blr_cast = 131;
1669     blr_release_lock = 132;
1670     blr_release_locks = 133;
1671     blr_start_savepoint = 134;
1672     blr_end_savepoint = 135;
1673     blr_find_dbkey = 136;
1674     blr_range_relation = 137;
1675     blr_delete_ranges = 138;
1676    
1677     blr_plan = 139;
1678     blr_merge = 140;
1679     blr_join = 141;
1680     blr_sequential = 142;
1681     blr_navigational = 143;
1682     blr_indices = 144;
1683     blr_retrieve = 145;
1684    
1685     blr_relation2 = 146;
1686     blr_rid2 = 147;
1687     blr_reset_stream = 148;
1688     blr_release_bookmark = 149;
1689     blr_set_generator = 150;
1690     blr_ansi_any = 151;
1691     blr_exists = 152;
1692     blr_cardinality = 153;
1693    
1694     blr_record_version = 154; (** get tid of record **)
1695     blr_stall = 155; (** fake server stall **)
1696     blr_seek_no_warn = 156;
1697     blr_find_dbkey_version = 157;
1698     blr_ansi_all = 158;
1699    
1700     blr_extract = 159;
1701    
1702     (* sub parameters for blr_extract *)
1703    
1704     blr_extract_year = 0;
1705     blr_extract_month = 1;
1706     blr_extract_day = 2;
1707     blr_extract_hour = 3;
1708     blr_extract_minute = 4;
1709     blr_extract_second = 5;
1710     blr_extract_weekday = 6;
1711     blr_extract_yearday = 7;
1712    
1713     blr_current_date = 160;
1714     blr_current_timestamp = 161;
1715     blr_current_time = 162;
1716    
1717     (* These verbs were added in 6.0,
1718     primarily to support 64-bit integers *)
1719    
1720     blr_add2 = 163;
1721     blr_subtract2 = 164;
1722     blr_multiply2 = 165;
1723     blr_divide2 = 166;
1724     blr_agg_total2 = 167;
1725     blr_agg_total_distinct2 = 168;
1726     blr_agg_average2 = 169;
1727     blr_agg_average_distinct2 = 170;
1728     blr_average2 = 171;
1729     blr_gen_id2 = 172;
1730     blr_set_generator2 = 173;
1731    
1732     (****************************************)
1733     (** Bit assignments in RDB$SYSTEM_FLAG **)
1734     (****************************************)
1735    
1736     RDB_system = 1;
1737     RDB_id_assigned = 2;
1738    
1739    
1740     (*******************************)
1741     (** Service information items **)
1742     (*******************************)
1743    
1744     {$IFDEF IB5_ONLY }
1745     (* This defines are not there in version 6.0 *)
1746     { isc_info_svc_version = 4;
1747     isc_info_svc_message = 5;
1748     isc_info_svc_total_length = 6;
1749     isc_info_svc_response = 7;
1750     isc_info_svc_response_more = 8;
1751     isc_info_svc_line = 9;
1752     isc_info_svc_to_eof = 10;
1753     isc_info_svc_timeout = 11;
1754     isc_info_svc_server_version = 12;
1755     isc_info_svc_implementation = 13;
1756     isc_info_svc_capabilities = 14;
1757     isc_info_svc_user_dbpath = 15;
1758     isc_info_svc_svr_db_info = 16;
1759     isc_info_svc_svr_online = 17;
1760     isc_info_svc_svr_offline = 18;
1761     isc_info_svc_get_config = 19;
1762     isc_info_svc_set_config = 20;
1763     isc_info_svc_default_config = 21;
1764     isc_info_svc_get_env = 22;
1765     isc_info_svc_get_env_lock = 23;
1766     isc_info_svc_get_env_msg = 24; }
1767     {$ENDIF}
1768    
1769    
1770    
1771     (*****************)
1772     (** Error codes **)
1773     (*****************)
1774    
1775     isc_facility = 20;
1776     isc_err_base = 335544320;
1777     isc_err_factor = 1;
1778     isc_arg_end = 0;
1779     isc_arg_gds = 1;
1780     isc_arg_string = 2;
1781     isc_arg_cstring = 3;
1782     isc_arg_number = 4;
1783     isc_arg_interpreted = 5;
1784     isc_arg_vms = 6;
1785     isc_arg_unix = 7;
1786     isc_arg_domain = 8;
1787     isc_arg_dos = 9;
1788     isc_arg_mpexl = 10;
1789     isc_arg_mpexl_ipc = 11;
1790     isc_arg_next_mach = 15;
1791     isc_arg_netware = 16;
1792     isc_arg_win32 = 17;
1793     isc_arg_warning = 18;
1794    
1795     (**********************************************)
1796     (** International text interpretation values **)
1797     (**********************************************)
1798    
1799     isc_interp_eng_ascii = 0;
1800     isc_interp_jpn_sjis = 5;
1801     isc_interp_jpn_euc = 6;
1802    
1803     (******************************************)
1804     (** Scroll direction for isc_dsql_fetch2 **)
1805     (******************************************)
1806    
1807     isc_fetch_next = 0;
1808     isc_fetch_prior = 1;
1809     isc_fetch_first = 2;
1810     isc_fetch_last = 3;
1811     isc_fetch_absolute = 4;
1812     isc_fetch_relative = 5;
1813    
1814    
1815    
1816     (** XSQLDA_LENGTH is defined in C as a macro, but in Pascal we must defined it
1817     as a function... **)
1818     function XSQLDA_LENGTH(n: Long): Long;
1819    
1820     implementation
1821    
1822    
1823     function XSQLDA_LENGTH(n: Long): Long;
1824     (* The C-macro reads like this:
1825     XSQLDA_LENGTH(n) (sizeof (XSQLDA) + (n-1) * sizeof (XSQLVAR)) *)
1826     begin
1827     result := SizeOf(TXSQLDA) + ((n - 1) * SizeOf(TXSQLVAR));
1828     end;
1829    
1830    
1831     end.
1832