00001 {*********************************************************}
00002 { }
00003 { Zeos Database Objects }
00004 { Delphi interface to gds32.dll }
00005 { Version 5.0+ }
00006 { }
00007 { Originally written by Sergey Seroukhov }
00008 { }
00009 {*********************************************************}
00010
00011 {@********************************************************}
00012 { Copyright (c) 1999-2006 Zeos Development Group }
00013 { }
00014 { License Agreement: }
00015 { }
00016 { This library is distributed in the hope that it will be }
00017 { useful, but WITHOUT ANY WARRANTY; without even the }
00018 { implied warranty of MERCHANTABILITY or FITNESS FOR }
00019 { A PARTICULAR PURPOSE. See the GNU Lesser General }
00020 { Public License for more details. }
00021 { }
00022 { The source code of the ZEOS Libraries and packages are }
00023 { distributed under the Library GNU General Public }
00024 { License (see the file COPYING / COPYING.ZEOS) }
00025 { with the following modification: }
00026 { As a special exception, the copyright holders of this }
00027 { library give you permission to link this library with }
00028 { independent modules to produce an executable, }
00029 { regardless of the license terms of these independent }
00030 { modules, and to copy and distribute the resulting }
00031 { executable under terms of your choice, provided that }
00032 { you also meet, for each linked independent module, }
00033 { the terms and conditions of the license of that module. }
00034 { An independent module is a module which is not derived }
00035 { from or based on this library. If you modify this }
00036 { library, you may extend this exception to your version }
00037 { of the library, but you are not obligated to do so. }
00038 { If you do not wish to do so, delete this exception }
00039 { statement from your version. }
00040 { }
00041 { }
00042 { The project web site is located on: }
00043 { http:
00044 { http:
00045 { svn:
00046 { }
00047 { http:
00048 { http:
00049 { }
00050 { }
00051 { }
00052 { Zeos Development Group. }
00053 {********************************************************@}
00054
00055 unit ZPlainInterbase5;
00056
00057 interface
00058
00059 {$I ZPlain.inc}
00060
00061 {$J+}
00062
00063 uses SysUtils, ZCompatibility, ZPlainLoader,
00064 ZPlainFirebirdInterbaseConstants;
00065
00066 { ***************** Plain API Constants definition **************** }
00067
00068 const
00069 WINDOWS_DLL_LOCATION = 'gds32.dll';
00070 LINUX_DLL_LOCATION = 'libgds.so';
00071
00072 type
00073
00074 { ************** Plain API Function types definition ************* }
00075
00076 { General database routines }
00077
00078 Tisc_attach_database = function(status_vector: PISC_STATUS;
00079 db_name_length: Short; db_name: PChar; db_handle: PISC_DB_HANDLE;
00080 parm_buffer_length: Short; parm_buffer: PChar): ISC_STATUS;
00081 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00082
00083 Tisc_detach_database = function(status_vector: PISC_STATUS;
00084 db_handle: PISC_DB_HANDLE): ISC_STATUS;
00085 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00086
00087 Tisc_drop_database = function(status_vector: PISC_STATUS;
00088 db_handle: PISC_DB_HANDLE): ISC_STATUS;
00089 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00090
00091 Tisc_database_info = function(status_vector: PISC_STATUS;
00092 db_handle: PISC_DB_HANDLE; item_list_buffer_length: Short;
00093 item_list_buffer: PChar; result_buffer_length: Short;
00094 result_buffer: PChar): ISC_STATUS;
00095 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00096
00097 { Array processing routines }
00098 Tisc_array_gen_sdl = function(status_vector: PISC_STATUS;
00099 isc_array_desc: PISC_ARRAY_DESC; isc_arg3: PShort;
00100 isc_arg4: PChar; isc_arg5: PShort): ISC_STATUS;
00101 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00102
00103 Tisc_array_get_slice = function(status_vector: PISC_STATUS;
00104 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00105 array_id: PISC_QUAD; descriptor: PISC_ARRAY_DESC;
00106 dest_array: PVoid; slice_length: ISC_LONG): ISC_STATUS;
00107 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00108
00109 Tisc_array_lookup_bounds = function(status_vector: PISC_STATUS;
00110 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00111 table_name, column_name: PChar;
00112 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00113 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00114
00115 Tisc_array_lookup_desc = function(status_vector: PISC_STATUS;
00116 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00117 table_name, column_name: PChar;
00118 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00119 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00120
00121 Tisc_array_set_desc = function(status_vector: PISC_STATUS;
00122 table_name: PChar; column_name: PChar;
00123 sql_dtype, sql_length, sql_dimensions: PShort;
00124 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00125 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00126
00127 Tisc_array_put_slice = function(status_vector: PISC_STATUS;
00128 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00129 array_id: PISC_QUAD; descriptor: PISC_ARRAY_DESC;
00130 source_array: PVoid; slice_length: PISC_LONG): ISC_STATUS;
00131 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00132
00133 Tisc_free = function(isc_arg1: PChar): ISC_LONG;
00134 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00135
00136 Tisc_sqlcode = function(status_vector: PISC_STATUS): ISC_LONG;
00137 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00138
00139 Tisc_sql_interprete = procedure(sqlcode: Short; buffer: PChar;
00140 buffer_length: Short); {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00141
00142 Tisc_interprete = function(buffer: PChar; status_vector: PPISC_STATUS):
00143 ISC_STATUS; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00144
00145 { Transaction support routines }
00146
00147 Tisc_start_transaction = function(status_vector: PISC_STATUS;
00148 tran_handle: PISC_TR_HANDLE; db_handle_count: Short;
00149 db_handle: PISC_DB_HANDLE; tpb_length: Word; tpb_address: PChar):
00150 ISC_STATUS; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00151
00152 Tisc_start_multiple = function(status_vector: PISC_STATUS;
00153 tran_handle: PISC_TR_HANDLE; db_handle_count: Short;
00154 teb_vector_address: PISC_TEB): ISC_STATUS;
00155 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00156
00157 Tisc_rollback_transaction = function(status_vector: PISC_STATUS;
00158 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00159 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00160
00161 Tisc_rollback_retaining = function(status_vector: PISC_STATUS;
00162 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00163 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00164
00165 Tisc_commit_retaining = function(status_vector: PISC_STATUS;
00166 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00167 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00168
00169 Tisc_commit_transaction = function(status_vector: PISC_STATUS;
00170 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00171 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00172
00173 Tisc_transaction_info = function(status_vector: PISC_STATUS;
00174 tr_handle: PISC_TR_HANDLE; item_list_buffer_length: Short;
00175 item_list_buffer: PChar; result_buffer_length: Short;
00176 result_buffer: PChar): ISC_STATUS;
00177 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00178
00179 { Dynamic SQL routines }
00180
00181 Tisc_dsql_allocate_statement = function(status_vector: PISC_STATUS;
00182 db_handle: PISC_DB_HANDLE; stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
00183 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00184
00185 Tisc_dsql_alloc_statement2 = function(status_vector: PISC_STATUS;
00186 db_handle: PISC_DB_HANDLE; stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
00187 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00188
00189 Tisc_dsql_describe = function(status_vector: PISC_STATUS;
00190 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00191 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00192
00193 Tisc_dsql_describe_bind = function(status_vector: PISC_STATUS;
00194 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00195 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00196
00197 Tisc_dsql_execute = function(status_vector: PISC_STATUS;
00198 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
00199 xsqlda: PXSQLDA): ISC_STATUS;
00200 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00201
00202 Tisc_dsql_execute2 = function(status_vector: PISC_STATUS;
00203 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
00204 in_xsqlda, out_xsqlda: PXSQLDA): ISC_STATUS;
00205 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00206
00207 Tisc_dsql_execute_immediate = function(status_vector: PISC_STATUS;
00208 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE; length: Word;
00209 statement: PChar; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00210 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00211
00212 Tisc_dsql_fetch = function(status_vector: PISC_STATUS;
00213 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00214 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00215
00216 Tisc_dsql_free_statement = function(status_vector: PISC_STATUS;
00217 stmt_handle: PISC_STMT_HANDLE; options: Word): ISC_STATUS;
00218 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00219
00220 Tisc_dsql_prepare = function(status_vector: PISC_STATUS;
00221 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE;
00222 length: Word; statement: PChar; dialect: Word; xsqlda: PXSQLDA):
00223 ISC_STATUS; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00224
00225 Tisc_dsql_set_cursor_name = function(status_vector: PISC_STATUS;
00226 stmt_handle: PISC_STMT_HANDLE; cursor_name: PChar; _type: Word): ISC_STATUS;
00227 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00228
00229 Tisc_dsql_sql_info = function(status_vector: PISC_STATUS;
00230 stmt_handle: PISC_STMT_HANDLE; item_length: Short; items: PChar;
00231 buffer_length: Short; buffer: PChar): ISC_STATUS;
00232 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00233
00234 { Blob processing routines }
00235
00236 Tisc_open_blob2 = function(status_vector: PISC_STATUS;
00237 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
00238 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
00239 bpb_buffer: PChar): ISC_STATUS;
00240 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00241
00242 Tisc_create_blob2 = function(status_vector: PISC_STATUS;
00243 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
00244 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
00245 bpb_address: PChar): ISC_STATUS;
00246 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00247
00248 Tisc_blob_info = function(status_vector: PISC_STATUS;
00249 blob_handle: PISC_BLOB_HANDLE; item_list_buffer_length: Short;
00250 item_list_buffer: PChar; result_buffer_length: Short; result_buffer: PChar):
00251 ISC_STATUS; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00252
00253 Tisc_close_blob = function(status_vector: PISC_STATUS;
00254 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
00255 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00256
00257 Tisc_cancel_blob = function(status_vector: PISC_STATUS;
00258 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
00259 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00260
00261 Tisc_get_segment = function(status_vector: PISC_STATUS;
00262 blob_handle: PISC_BLOB_HANDLE; actual_seg_length: PWord;
00263 seg_buffer_length: Word; seg_buffer: PChar): ISC_STATUS;
00264 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00265
00266 Tisc_put_segment = function(status_vector: PISC_STATUS;
00267 blob_handle: PISC_BLOB_HANDLE; seg_buffer_len: Word; seg_buffer: PChar):
00268 ISC_STATUS; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00269
00270 { Event processing routines }
00271
00272 Tisc_event_block = function(event_buffer: PPChar; result_buffer: PPChar;
00273 id_count: Word; event_list: array of PChar): ISC_LONG;
00274 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00275
00276 Tisc_event_counts = procedure(status_vector: PISC_STATUS;
00277 buffer_length: Short; event_buffer: PChar; result_buffer: PChar);
00278 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00279
00280 Tisc_cancel_events = function(status_vector: PISC_STATUS;
00281 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG): ISC_STATUS;
00282 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00283
00284 Tisc_que_events = function(status_vector: PISC_STATUS;
00285 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG; length: Short;
00286 event_buffer: PChar; event_function: TISC_CALLBACK;
00287 event_function_arg: PVoid): ISC_STATUS;
00288 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00289
00290 { Types convertion routines }
00291
00292 Tisc_decode_date = procedure(ib_date: PISC_QUAD; tm_date: PCTimeStructure);
00293 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00294
00295 Tisc_encode_date = procedure(tm_date: PCTimeStructure; ib_date: PISC_QUAD);
00296 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00297
00298 Tisc_vax_integer = function(buffer: PChar; length: Short): ISC_LONG;
00299 {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
00300
00301 procedure isc_encode_sql_date_stub(tm_date: PCTimeStructure; ib_date: PISC_DATE);
00302 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00303
00304 procedure isc_encode_sql_time_stub(tm_date: PCTimeStructure; ib_time: PISC_TIME);
00305 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00306
00307 procedure isc_encode_timestamp_stub(tm_date: PCTimeStructure; ib_timestamp: PISC_TIMESTAMP);
00308 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00309
00310 procedure isc_decode_sql_date_stub(ib_date: PISC_DATE; tm_date: PCTimeStructure);
00311 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00312
00313 procedure isc_decode_sql_time_stub(ib_time: PISC_TIME; tm_date: PCTimeStructure);
00314 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00315
00316 procedure isc_decode_timestamp_stub(ib_timestamp: PISC_TIMESTAMP; tm_date: PCTimeStructure);
00317 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00318
00319
00320 { ************* Plain API Function variables definition ************ }
00321
00322 var
00323 { General database routines }
00324 isc_attach_database: Tisc_attach_database;
00325 isc_detach_database: Tisc_detach_database;
00326 isc_drop_database: Tisc_drop_database;
00327 isc_database_info: Tisc_database_info;
00328 isc_free: Tisc_free;
00329 isc_sqlcode: Tisc_sqlcode;
00330 isc_sql_interprete: Tisc_sql_interprete;
00331 isc_interprete: Tisc_interprete;
00332
00333 { Transaction support routines }
00334 isc_start_transaction: Tisc_start_transaction;
00335 isc_start_multiple: Tisc_start_multiple;
00336 isc_rollback_transaction: Tisc_rollback_transaction;
00337 isc_rollback_retaining: Tisc_rollback_retaining;
00338 isc_commit_transaction: Tisc_commit_transaction;
00339 isc_commit_retaining: Tisc_commit_retaining;
00340 isc_transaction_info: Tisc_transaction_info;
00341
00342 { Dynamic SQL routines }
00343 isc_dsql_allocate_statement: Tisc_dsql_allocate_statement;
00344 isc_dsql_alloc_statement2: Tisc_dsql_alloc_statement2;
00345 isc_dsql_describe: Tisc_dsql_describe;
00346 isc_dsql_describe_bind: Tisc_dsql_describe_bind;
00347 isc_dsql_execute: Tisc_dsql_execute;
00348 isc_dsql_execute2: Tisc_dsql_execute2;
00349 isc_dsql_execute_immediate: Tisc_dsql_execute_immediate;
00350 isc_dsql_fetch: Tisc_dsql_fetch;
00351 isc_dsql_free_statement: Tisc_dsql_free_statement;
00352 isc_dsql_prepare: Tisc_dsql_prepare;
00353 isc_dsql_set_cursor_name: Tisc_dsql_set_cursor_name;
00354 isc_dsql_sql_info: Tisc_dsql_sql_info;
00355
00356 { Array processing routines }
00357 isc_array_gen_sdl: Tisc_array_gen_sdl;
00358 isc_array_get_slice: Tisc_array_get_slice;
00359 isc_array_lookup_bounds: Tisc_array_lookup_bounds;
00360 isc_array_lookup_desc: Tisc_array_lookup_desc;
00361 isc_array_set_desc: Tisc_array_set_desc;
00362 isc_array_put_slice: Tisc_array_put_slice;
00363
00364 { Blob processing routines }
00365 isc_open_blob2: Tisc_open_blob2;
00366 isc_create_blob2: Tisc_create_blob2;
00367 isc_blob_info: Tisc_blob_info;
00368 isc_close_blob: Tisc_close_blob;
00369 isc_cancel_blob: Tisc_cancel_blob;
00370 isc_get_segment: Tisc_get_segment;
00371 isc_put_segment: Tisc_put_segment;
00372
00373 { Event processing routines }
00374 isc_que_events: Tisc_que_events;
00375 isc_event_counts: Tisc_event_counts;
00376 isc_event_block: Tisc_event_block;
00377 isc_cancel_events: Tisc_cancel_events;
00378
00379 { Types convertion routines }
00380 isc_encode_date: Tisc_encode_date;
00381 isc_decode_date: Tisc_decode_date;
00382 isc_vax_integer: Tisc_vax_integer;
00383
00384 var
00385 LibraryLoader: TZNativeLibraryLoader;
00386
00387 implementation
00388
00389 uses ZMessages;
00390
00391 type
00392 {** Implements a loader for Interbase native library. }
00393 TZInterbaseNativeLibraryLoader = class (TZNativeLibraryLoader)
00394 public
00395 function Load: Boolean; override;
00396 end;
00397
00398 procedure isc_encode_sql_date_stub(tm_date: PCTimeStructure; ib_date: PISC_DATE);
00399 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00400 begin
00401 raise Exception.Create(SEncodeDateIsNotSupported);
00402 end;
00403
00404 procedure isc_encode_sql_time_stub(tm_date: PCTimeStructure; ib_time: PISC_TIME);
00405 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00406 begin
00407 raise Exception.Create(SEncodeTimeIsNotSupported);
00408 end;
00409
00410 procedure isc_encode_timestamp_stub(tm_date: PCTimeStructure; ib_timestamp: PISC_TIMESTAMP);
00411 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00412 begin
00413 raise Exception.Create(SEncodeTimestampIsNotSupported);
00414 end;
00415
00416 procedure isc_decode_sql_date_stub(ib_date: PISC_DATE; tm_date: PCTimeStructure);
00417 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00418 begin
00419 raise Exception.Create(SDecodeDateIsNotSupported);
00420 end;
00421
00422 procedure isc_decode_sql_time_stub(ib_time: PISC_TIME; tm_date: PCTimeStructure);
00423 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00424 begin
00425 raise Exception.Create(SDecodeTimeIsNotSupported);
00426 end;
00427
00428 procedure isc_decode_timestamp_stub(ib_timestamp: PISC_TIMESTAMP; tm_date: PCTimeStructure);
00429 {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF UNIX} cdecl; {$ENDIF}
00430 begin
00431 raise Exception.Create(SDecodeTimestampIsNotSupported);
00432 end;
00433
00434
00435 { TZInterbaseNativeLibraryLoader }
00436
00437 {**
00438 Loads a library module.
00439 @return <code>True</code> if library was successfully loaded.
00440 }
00441 function TZInterbaseNativeLibraryLoader.Load: Boolean;
00442 begin
00443 Result := inherited Load;
00444
00445 isc_sqlcode := GetAddress('isc_sqlcode');
00446 isc_sql_interprete := GetAddress('isc_sql_interprete');
00447 isc_interprete := GetAddress('isc_interprete');
00448 isc_vax_integer := GetAddress('isc_vax_integer');
00449
00450 isc_array_gen_sdl := GetAddress( 'isc_array_gen_sdl');
00451 isc_array_get_slice := GetAddress( 'isc_array_get_slice');
00452 isc_array_lookup_bounds := GetAddress( 'isc_array_lookup_bounds');
00453 isc_array_lookup_desc := GetAddress( 'isc_array_lookup_desc');
00454 isc_array_set_desc := GetAddress( 'isc_array_set_desc');
00455 isc_array_put_slice := GetAddress( 'isc_array_put_slice');
00456
00457 isc_blob_info := GetAddress('isc_blob_info');
00458 isc_open_blob2 := GetAddress('isc_open_blob2');
00459 isc_close_blob := GetAddress('isc_close_blob');
00460 isc_cancel_blob := GetAddress('isc_cancel_blob');
00461 isc_get_segment := GetAddress('isc_get_segment');
00462 isc_put_segment := GetAddress('isc_put_segment');
00463 isc_create_blob2 := GetAddress('isc_create_blob2');
00464 isc_decode_date := GetAddress('isc_decode_date');
00465 isc_encode_date := GetAddress('isc_encode_date');
00466 isc_dsql_free_statement := GetAddress('isc_dsql_free_statement');
00467 isc_dsql_execute2 := GetAddress('isc_dsql_execute2');
00468 isc_dsql_execute := GetAddress('isc_dsql_execute');
00469 isc_dsql_set_cursor_name := GetAddress('isc_dsql_set_cursor_name');
00470 isc_dsql_fetch := GetAddress('isc_dsql_fetch');
00471 isc_dsql_sql_info := GetAddress('isc_dsql_sql_info');
00472 isc_dsql_allocate_statement := GetAddress('isc_dsql_allocate_statement');
00473 isc_dsql_alloc_statement2 := GetAddress('isc_dsql_alloc_statement2');
00474 isc_dsql_prepare := GetAddress('isc_dsql_prepare');
00475 isc_dsql_describe_bind := GetAddress('isc_dsql_describe_bind');
00476 isc_dsql_describe := GetAddress('isc_dsql_describe');
00477 isc_dsql_execute_immediate := GetAddress('isc_dsql_execute_immediate');
00478 isc_drop_database := GetAddress('isc_drop_database');
00479 isc_detach_database := GetAddress('isc_detach_database');
00480 isc_attach_database := GetAddress('isc_attach_database');
00481 isc_database_info := GetAddress('isc_database_info');
00482 isc_transaction_info := GetAddress('isc_transaction_info');
00483 isc_start_multiple := GetAddress('isc_start_multiple');
00484 isc_start_transaction := GetAddress('isc_start_transaction');
00485 isc_commit_transaction := GetAddress('isc_commit_transaction');
00486
00487 isc_commit_retaining := GetAddress('isc_commit_retaining');
00488 isc_rollback_transaction := GetAddress('isc_rollback_transaction');
00489 isc_cancel_events := GetAddress('isc_cancel_events');
00490 isc_que_events := GetAddress('isc_que_events');
00491 isc_event_counts := GetAddress('isc_event_counts');
00492 isc_event_block := GetAddress('isc_event_block');
00493 isc_free := GetAddress('isc_free');
00494 end;
00495
00496 initialization
00497 {$IFNDEF UNIX}
00498 LibraryLoader := TZInterbaseNativeLibraryLoader.Create(
00499 [WINDOWS_DLL_LOCATION]);
00500 {$ELSE}
00501 LibraryLoader := TZInterbaseNativeLibraryLoader.Create(
00502 [LINUX_DLL_LOCATION]);
00503 {$ENDIF}
00504 finalization
00505 if Assigned(LibraryLoader) then
00506 LibraryLoader.Free;
00507 end.