00001 {*********************************************************}
00002 { }
00003 { Zeos Database Objects }
00004 { Native Plain Drivers for Interbase }
00005 { }
00006 { Originally written by Sergey Seroukhov }
00007 { }
00008 {*********************************************************}
00009
00010 {@********************************************************}
00011 { Copyright (c) 1999-2006 Zeos Development Group }
00012 { }
00013 { License Agreement: }
00014 { }
00015 { This library is distributed in the hope that it will be }
00016 { useful, but WITHOUT ANY WARRANTY; without even the }
00017 { implied warranty of MERCHANTABILITY or FITNESS FOR }
00018 { A PARTICULAR PURPOSE. See the GNU Lesser General }
00019 { Public License for more details. }
00020 { }
00021 { The source code of the ZEOS Libraries and packages are }
00022 { distributed under the Library GNU General Public }
00023 { License (see the file COPYING / COPYING.ZEOS) }
00024 { with the following modification: }
00025 { As a special exception, the copyright holders of this }
00026 { library give you permission to link this library with }
00027 { independent modules to produce an executable, }
00028 { regardless of the license terms of these independent }
00029 { modules, and to copy and distribute the resulting }
00030 { executable under terms of your choice, provided that }
00031 { you also meet, for each linked independent module, }
00032 { the terms and conditions of the license of that module. }
00033 { An independent module is a module which is not derived }
00034 { from or based on this library. If you modify this }
00035 { library, you may extend this exception to your version }
00036 { of the library, but you are not obligated to do so. }
00037 { If you do not wish to do so, delete this exception }
00038 { statement from your version. }
00039 { }
00040 { }
00041 { The project web site is located on: }
00042 { http:
00043 { http:
00044 { svn:
00045 { }
00046 { http:
00047 { http:
00048 { }
00049 { }
00050 { }
00051 { Zeos Development Group. }
00052 {********************************************************@}
00053
00054 unit ZPlainInterbaseDriver;
00055
00056 interface
00057
00058 {$I ZPlain.inc}
00059
00060 uses ZClasses, ZCompatibility, ZPlainDriver,ZPlainFirebirdInterbaseConstants;
00061
00062 type
00063 {** Represents a generic interface to Interbase native API. }
00064 IZInterbasePlainDriver = interface (IZPlainDriver)
00065 ['{AE2C4379-4E47-4752-BC01-D405ACC337F5}']
00066 function isc_attach_database (status_vector: PISC_STATUS;
00067 db_name_length: Short; db_name: PChar; db_handle: PISC_DB_HANDLE;
00068 parm_buffer_length: Short; parm_buffer: PChar): ISC_STATUS;
00069 function isc_detach_database(status_vector: PISC_STATUS;
00070 db_handle: PISC_DB_HANDLE): ISC_STATUS;
00071 function isc_drop_database(status_vector: PISC_STATUS;
00072 db_handle: PISC_DB_HANDLE): ISC_STATUS;
00073 function isc_database_info(status_vector: PISC_STATUS;
00074 db_handle: PISC_DB_HANDLE; item_list_buffer_length: Short;
00075 item_list_buffer: PChar; result_buffer_length: Short;
00076 result_buffer: PChar): ISC_STATUS;
00077 function isc_array_gen_sdl(status_vector: PISC_STATUS;
00078 isc_array_desc: PISC_ARRAY_DESC; isc_arg3: PShort;
00079 isc_arg4: PChar; isc_arg5: PShort): ISC_STATUS;
00080 function isc_array_get_slice(status_vector: PISC_STATUS;
00081 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00082 array_id: PISC_QUAD; descriptor: PISC_ARRAY_DESC;
00083 dest_array: PVoid; slice_length: ISC_LONG): ISC_STATUS;
00084 function isc_array_lookup_bounds(status_vector: PISC_STATUS;
00085 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00086 table_name, column_name: PChar;
00087 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00088 function isc_array_lookup_desc(status_vector: PISC_STATUS;
00089 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00090 table_name, column_name: PChar;
00091 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00092 function isc_array_set_desc(status_vector: PISC_STATUS;
00093 table_name: PChar; column_name: PChar;
00094 sql_dtype, sql_length, sql_dimensions: PShort;
00095 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00096 function isc_array_put_slice(status_vector: PISC_STATUS;
00097 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00098 array_id: PISC_QUAD; descriptor: PISC_ARRAY_DESC;
00099 source_array: PVoid; slice_length: PISC_LONG): ISC_STATUS;
00100 function isc_free(isc_arg1: PChar): ISC_LONG;
00101 function isc_sqlcode(status_vector: PISC_STATUS): ISC_LONG;
00102 procedure isc_sql_interprete(sqlcode: Short; buffer: PChar;
00103 buffer_length: Short);
00104 function isc_interprete(buffer: PChar; status_vector: PPISC_STATUS): ISC_STATUS;
00105 function isc_start_transaction(status_vector: PISC_STATUS;
00106 tran_handle: PISC_TR_HANDLE; db_handle_count: Short;
00107 db_handle: PISC_DB_HANDLE; tpb_length: Word; tpb_address: PChar): ISC_STATUS;
00108 function isc_start_multiple(status_vector: PISC_STATUS;
00109 tran_handle: PISC_TR_HANDLE; db_handle_count: Short;
00110 teb_vector_address: PISC_TEB): ISC_STATUS;
00111 function isc_rollback_transaction(status_vector: PISC_STATUS;
00112 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00113 function isc_rollback_retaining(status_vector: PISC_STATUS;
00114 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00115 function isc_commit_retaining(status_vector: PISC_STATUS;
00116 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00117 function isc_commit_transaction(status_vector: PISC_STATUS;
00118 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00119 function isc_dsql_allocate_statement(status_vector: PISC_STATUS;
00120 db_handle: PISC_DB_HANDLE; stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
00121 function isc_dsql_alloc_statement2(status_vector: PISC_STATUS;
00122 db_handle: PISC_DB_HANDLE; stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
00123 function isc_dsql_describe(status_vector: PISC_STATUS;
00124 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00125 function isc_dsql_describe_bind(status_vector: PISC_STATUS;
00126 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00127 function isc_dsql_execute(status_vector: PISC_STATUS;
00128 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
00129 xsqlda: PXSQLDA): ISC_STATUS;
00130 function isc_dsql_execute2(status_vector: PISC_STATUS;
00131 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
00132 in_xsqlda, out_xsqlda: PXSQLDA): ISC_STATUS;
00133 function isc_dsql_execute_immediate(status_vector: PISC_STATUS;
00134 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE; length: Word;
00135 statement: PChar; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00136 function isc_dsql_fetch(status_vector: PISC_STATUS;
00137 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00138 function isc_dsql_free_statement(status_vector: PISC_STATUS;
00139 stmt_handle: PISC_STMT_HANDLE; options: Word): ISC_STATUS;
00140 function isc_dsql_prepare(status_vector: PISC_STATUS;
00141 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE;
00142 length: Word; statement: PChar; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00143 function isc_dsql_set_cursor_name(status_vector: PISC_STATUS;
00144 stmt_handle: PISC_STMT_HANDLE; cursor_name: PChar; _type: Word): ISC_STATUS;
00145 function isc_dsql_sql_info(status_vector: PISC_STATUS;
00146 stmt_handle: PISC_STMT_HANDLE; item_length: Short; items: PChar;
00147 buffer_length: Short; buffer: PChar): ISC_STATUS;
00148 function isc_open_blob2(status_vector: PISC_STATUS;
00149 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
00150 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
00151 bpb_buffer: PChar): ISC_STATUS;
00152 function isc_create_blob2(status_vector: PISC_STATUS;
00153 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
00154 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
00155 bpb_address: PChar): ISC_STATUS;
00156 function isc_blob_info(status_vector: PISC_STATUS;
00157 blob_handle: PISC_BLOB_HANDLE; item_list_buffer_length: Short;
00158 item_list_buffer: PChar; result_buffer_length: Short; result_buffer: PChar): PISC_STATUS;
00159 function isc_close_blob(status_vector: PISC_STATUS;
00160 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
00161 function isc_cancel_blob(status_vector: PISC_STATUS;
00162 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
00163 function isc_get_segment(status_vector: PISC_STATUS;
00164 blob_handle: PISC_BLOB_HANDLE; actual_seg_length: PWord;
00165 seg_buffer_length: Word; seg_buffer: PChar): ISC_STATUS;
00166 function isc_put_segment(status_vector: PISC_STATUS;
00167 blob_handle: PISC_BLOB_HANDLE; seg_buffer_len: Word; seg_buffer: PChar): ISC_STATUS;
00168 function isc_event_block(event_buffer: PPChar; result_buffer: PPChar;
00169 id_count: Word; event_list: array of PChar): ISC_LONG;
00170 procedure isc_event_counts(status_vector: PISC_STATUS;
00171 buffer_length: Short; event_buffer: PChar; result_buffer: PChar);
00172 function isc_cancel_events(status_vector: PISC_STATUS;
00173 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG): ISC_STATUS;
00174 function isc_que_events(status_vector: PISC_STATUS;
00175 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG; length: Short;
00176 event_buffer: PChar; event_function: TISC_CALLBACK;
00177 event_function_arg: PVoid): ISC_STATUS;
00178 procedure isc_decode_date(ib_date: PISC_QUAD; tm_date: PCTimeStructure);
00179 procedure isc_encode_date(tm_date: PCTimeStructure; ib_date: PISC_QUAD);
00180 function isc_vax_integer(buffer: PChar; length: Short): ISC_LONG;
00181
00182 procedure isc_decode_sql_date(ib_date: PISC_DATE; tm_date: PCTimeStructure);
00183 procedure isc_decode_sql_time(ib_time: PISC_TIME; tm_date: PCTimeStructure);
00184 procedure isc_decode_timestamp(ib_timestamp: PISC_TIMESTAMP;
00185 tm_date: PCTimeStructure);
00186 procedure isc_encode_sql_date(tm_date: PCTimeStructure;
00187 ib_date: PISC_DATE);
00188 procedure isc_encode_sql_time(tm_date: PCTimeStructure;
00189 ib_time: PISC_TIME);
00190 procedure isc_encode_timestamp(tm_date: PCTimeStructure;
00191 ib_timestamp: PISC_TIMESTAMP);
00192 end;
00193
00194 {** Represents an interface to Interbase 6+ native API. }
00195 IZInterbase6PlainDriver = interface (IZInterbasePlainDriver)
00196 ['{AFCC45CF-CF6D-499B-8EC2-5C1737A59E30}']
00197 end;
00198
00199 {** Represents class to Interbase 6+ native API. }
00200 TZInterbase6PlainDriver = class (TZAbstractObject, IZPlainDriver,
00201 IZInterbasePlainDriver, IZInterbase6PlainDriver)
00202 public
00203 constructor Create;
00204
00205 function GetProtocol: string;
00206 function GetDescription: string;
00207 procedure Initialize;
00208
00209 function isc_attach_database (status_vector: PISC_STATUS;
00210 db_name_length: Short; db_name: PChar; db_handle: PISC_DB_HANDLE;
00211 parm_buffer_length: Short; parm_buffer: PChar): ISC_STATUS;
00212 function isc_detach_database(status_vector: PISC_STATUS;
00213 db_handle: PISC_DB_HANDLE): ISC_STATUS;
00214 function isc_drop_database(status_vector: PISC_STATUS;
00215 db_handle: PISC_DB_HANDLE): ISC_STATUS;
00216 function isc_database_info(status_vector: PISC_STATUS;
00217 db_handle: PISC_DB_HANDLE; item_list_buffer_length: Short;
00218 item_list_buffer: PChar; result_buffer_length: Short;
00219 result_buffer: PChar): ISC_STATUS;
00220 function isc_array_gen_sdl(status_vector: PISC_STATUS;
00221 isc_array_desc: PISC_ARRAY_DESC; isc_arg3: PShort;
00222 isc_arg4: PChar; isc_arg5: PShort): ISC_STATUS;
00223 function isc_array_get_slice(status_vector: PISC_STATUS;
00224 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00225 array_id: PISC_QUAD; descriptor: PISC_ARRAY_DESC;
00226 dest_array: PVoid; slice_length: ISC_LONG): ISC_STATUS;
00227 function isc_array_lookup_bounds(status_vector: PISC_STATUS;
00228 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00229 table_name, column_name: PChar;
00230 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00231 function isc_array_lookup_desc(status_vector: PISC_STATUS;
00232 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00233 table_name, column_name: PChar;
00234 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00235 function isc_array_set_desc(status_vector: PISC_STATUS;
00236 table_name: PChar; column_name: PChar;
00237 sql_dtype, sql_length, sql_dimensions: PShort;
00238 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00239 function isc_array_put_slice(status_vector: PISC_STATUS;
00240 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00241 array_id: PISC_QUAD; descriptor: PISC_ARRAY_DESC;
00242 source_array: PVoid; slice_length: PISC_LONG): ISC_STATUS;
00243 function isc_free(isc_arg1: PChar): ISC_LONG;
00244 function isc_sqlcode(status_vector: PISC_STATUS): ISC_LONG;
00245 procedure isc_sql_interprete(sqlcode: Short; buffer: PChar;
00246 buffer_length: Short);
00247 function isc_interprete(buffer: PChar; status_vector: PPISC_STATUS): ISC_STATUS;
00248 function isc_start_transaction(status_vector: PISC_STATUS;
00249 tran_handle: PISC_TR_HANDLE; db_handle_count: Short;
00250 db_handle: PISC_DB_HANDLE; tpb_length: Word; tpb_address: PChar): ISC_STATUS;
00251 function isc_start_multiple(status_vector: PISC_STATUS;
00252 tran_handle: PISC_TR_HANDLE; db_handle_count: Short;
00253 teb_vector_address: PISC_TEB): ISC_STATUS;
00254 function isc_rollback_transaction(status_vector: PISC_STATUS;
00255 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00256 function isc_rollback_retaining(status_vector: PISC_STATUS;
00257 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00258 function isc_commit_retaining(status_vector: PISC_STATUS;
00259 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00260 function isc_commit_transaction(status_vector: PISC_STATUS;
00261 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00262 function isc_dsql_allocate_statement(status_vector: PISC_STATUS;
00263 db_handle: PISC_DB_HANDLE; stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
00264 function isc_dsql_alloc_statement2(status_vector: PISC_STATUS;
00265 db_handle: PISC_DB_HANDLE; stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
00266 function isc_dsql_describe(status_vector: PISC_STATUS;
00267 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00268 function isc_dsql_describe_bind(status_vector: PISC_STATUS;
00269 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00270 function isc_dsql_execute(status_vector: PISC_STATUS;
00271 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
00272 xsqlda: PXSQLDA): ISC_STATUS;
00273 function isc_dsql_execute2(status_vector: PISC_STATUS;
00274 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
00275 in_xsqlda, out_xsqlda: PXSQLDA): ISC_STATUS;
00276 function isc_dsql_execute_immediate(status_vector: PISC_STATUS;
00277 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE; length: Word;
00278 statement: PChar; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00279 function isc_dsql_fetch(status_vector: PISC_STATUS;
00280 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00281 function isc_dsql_free_statement(status_vector: PISC_STATUS;
00282 stmt_handle: PISC_STMT_HANDLE; options: Word): ISC_STATUS;
00283 function isc_dsql_prepare(status_vector: PISC_STATUS;
00284 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE;
00285 length: Word; statement: PChar; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00286 function isc_dsql_set_cursor_name(status_vector: PISC_STATUS;
00287 stmt_handle: PISC_STMT_HANDLE; cursor_name: PChar; _type: Word): ISC_STATUS;
00288 function isc_dsql_sql_info(status_vector: PISC_STATUS;
00289 stmt_handle: PISC_STMT_HANDLE; item_length: Short; items: PChar;
00290 buffer_length: Short; buffer: PChar): ISC_STATUS;
00291 function isc_open_blob2(status_vector: PISC_STATUS;
00292 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
00293 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
00294 bpb_buffer: PChar): ISC_STATUS;
00295 function isc_create_blob2(status_vector: PISC_STATUS;
00296 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
00297 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
00298 bpb_address: PChar): ISC_STATUS;
00299 function isc_blob_info(status_vector: PISC_STATUS;
00300 blob_handle: PISC_BLOB_HANDLE; item_list_buffer_length: Short;
00301 item_list_buffer: PChar; result_buffer_length: Short; result_buffer: PChar): PISC_STATUS;
00302 function isc_close_blob(status_vector: PISC_STATUS;
00303 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
00304 function isc_cancel_blob(status_vector: PISC_STATUS;
00305 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
00306 function isc_get_segment(status_vector: PISC_STATUS;
00307 blob_handle: PISC_BLOB_HANDLE; actual_seg_length: PWord;
00308 seg_buffer_length: Word; seg_buffer: PChar): ISC_STATUS;
00309 function isc_put_segment(status_vector: PISC_STATUS;
00310 blob_handle: PISC_BLOB_HANDLE; seg_buffer_len: Word; seg_buffer: PChar): ISC_STATUS;
00311 function isc_event_block(event_buffer: PPChar; result_buffer: PPChar;
00312 id_count: Word; event_list: array of PChar): ISC_LONG;
00313 procedure isc_event_counts(status_vector: PISC_STATUS;
00314 buffer_length: Short; event_buffer: PChar; result_buffer: PChar);
00315 function isc_cancel_events(status_vector: PISC_STATUS;
00316 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG): ISC_STATUS;
00317 function isc_que_events(status_vector: PISC_STATUS;
00318 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG; length: Short;
00319 event_buffer: PChar; event_function: TISC_CALLBACK;
00320 event_function_arg: PVoid): ISC_STATUS;
00321 procedure isc_decode_date(ib_date: PISC_QUAD; tm_date: PCTimeStructure);
00322 procedure isc_encode_date(tm_date: PCTimeStructure; ib_date: PISC_QUAD);
00323 { Interbase Version 6 routines }
00324 procedure isc_decode_sql_date(ib_date: PISC_DATE; tm_date: PCTimeStructure);
00325 procedure isc_decode_sql_time(ib_time: PISC_TIME; tm_date: PCTimeStructure);
00326 procedure isc_decode_timestamp(ib_timestamp: PISC_TIMESTAMP;
00327 tm_date: PCTimeStructure);
00328 procedure isc_encode_sql_date(tm_date: PCTimeStructure;
00329 ib_date: PISC_DATE);
00330 procedure isc_encode_sql_time(tm_date: PCTimeStructure;
00331 ib_time: PISC_TIME);
00332 procedure isc_encode_timestamp(tm_date: PCTimeStructure;
00333 ib_timestamp: PISC_TIMESTAMP);
00334 function isc_vax_integer(buffer: PChar; length: Short): ISC_LONG;
00335 end;
00336
00337 {** Represents an interface to Interbase 5 native API. }
00338 IZInterbase5PlainDriver = interface (IZInterbasePlainDriver)
00339 ['{0AF9A168-9494-4327-AD35-6A2FA6E811DD}']
00340 end;
00341
00342 {** Represents class to Interbase 5 native API. }
00343 TZInterbase5PlainDriver = class (TZAbstractObject, IZPlainDriver,
00344 IZInterbasePlainDriver, IZInterbase5PlainDriver)
00345 public
00346 constructor Create;
00347
00348 function GetProtocol: string;
00349 function GetDescription: string;
00350 procedure Initialize;
00351
00352 function isc_attach_database (status_vector: PISC_STATUS;
00353 db_name_length: Short; db_name: PChar; db_handle: PISC_DB_HANDLE;
00354 parm_buffer_length: Short; parm_buffer: PChar): ISC_STATUS;
00355 function isc_detach_database(status_vector: PISC_STATUS;
00356 db_handle: PISC_DB_HANDLE): ISC_STATUS;
00357 function isc_drop_database(status_vector: PISC_STATUS;
00358 db_handle: PISC_DB_HANDLE): ISC_STATUS;
00359 function isc_database_info(status_vector: PISC_STATUS;
00360 db_handle: PISC_DB_HANDLE; item_list_buffer_length: Short;
00361 item_list_buffer: PChar; result_buffer_length: Short;
00362 result_buffer: PChar): ISC_STATUS;
00363 function isc_array_gen_sdl(status_vector: PISC_STATUS;
00364 isc_array_desc: PISC_ARRAY_DESC; isc_arg3: PShort;
00365 isc_arg4: PChar; isc_arg5: PShort): ISC_STATUS;
00366 function isc_array_get_slice(status_vector: PISC_STATUS;
00367 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00368 array_id: PISC_QUAD; descriptor: PISC_ARRAY_DESC;
00369 dest_array: PVoid; slice_length: ISC_LONG): ISC_STATUS;
00370 function isc_array_lookup_bounds(status_vector: PISC_STATUS;
00371 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00372 table_name, column_name: PChar;
00373 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00374 function isc_array_lookup_desc(status_vector: PISC_STATUS;
00375 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00376 table_name, column_name: PChar;
00377 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00378 function isc_array_set_desc(status_vector: PISC_STATUS;
00379 table_name: PChar; column_name: PChar;
00380 sql_dtype, sql_length, sql_dimensions: PShort;
00381 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00382 function isc_array_put_slice(status_vector: PISC_STATUS;
00383 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE;
00384 array_id: PISC_QUAD; descriptor: PISC_ARRAY_DESC;
00385 source_array: PVoid; slice_length: PISC_LONG): ISC_STATUS;
00386 function isc_free(isc_arg1: PChar): ISC_LONG;
00387 function isc_sqlcode(status_vector: PISC_STATUS): ISC_LONG;
00388 procedure isc_sql_interprete(sqlcode: Short; buffer: PChar;
00389 buffer_length: Short);
00390 function isc_interprete(buffer: PChar; status_vector: PPISC_STATUS): ISC_STATUS;
00391 function isc_start_transaction(status_vector: PISC_STATUS;
00392 tran_handle: PISC_TR_HANDLE; db_handle_count: Short;
00393 db_handle: PISC_DB_HANDLE; tpb_length: Word; tpb_address: PChar): ISC_STATUS;
00394 function isc_start_multiple(status_vector: PISC_STATUS;
00395 tran_handle: PISC_TR_HANDLE; db_handle_count: Short;
00396 teb_vector_address: PISC_TEB): ISC_STATUS;
00397 function isc_rollback_transaction(status_vector: PISC_STATUS;
00398 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00399 function isc_rollback_retaining(status_vector: PISC_STATUS;
00400 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00401 function isc_commit_retaining(status_vector: PISC_STATUS;
00402 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00403 function isc_commit_transaction(status_vector: PISC_STATUS;
00404 tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00405 function isc_dsql_allocate_statement(status_vector: PISC_STATUS;
00406 db_handle: PISC_DB_HANDLE; stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
00407 function isc_dsql_alloc_statement2(status_vector: PISC_STATUS;
00408 db_handle: PISC_DB_HANDLE; stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
00409 function isc_dsql_describe(status_vector: PISC_STATUS;
00410 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00411 function isc_dsql_describe_bind(status_vector: PISC_STATUS;
00412 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00413 function isc_dsql_execute(status_vector: PISC_STATUS;
00414 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
00415 xsqlda: PXSQLDA): ISC_STATUS;
00416 function isc_dsql_execute2(status_vector: PISC_STATUS;
00417 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
00418 in_xsqlda, out_xsqlda: PXSQLDA): ISC_STATUS;
00419 function isc_dsql_execute_immediate(status_vector: PISC_STATUS;
00420 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE; length: Word;
00421 statement: PChar; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00422 function isc_dsql_fetch(status_vector: PISC_STATUS;
00423 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00424 function isc_dsql_free_statement(status_vector: PISC_STATUS;
00425 stmt_handle: PISC_STMT_HANDLE; options: Word): ISC_STATUS;
00426 function isc_dsql_prepare(status_vector: PISC_STATUS;
00427 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE;
00428 length: Word; statement: PChar; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00429 function isc_dsql_set_cursor_name(status_vector: PISC_STATUS;
00430 stmt_handle: PISC_STMT_HANDLE; cursor_name: PChar; _type: Word): ISC_STATUS;
00431 function isc_dsql_sql_info(status_vector: PISC_STATUS;
00432 stmt_handle: PISC_STMT_HANDLE; item_length: Short; items: PChar;
00433 buffer_length: Short; buffer: PChar): ISC_STATUS;
00434 function isc_open_blob2(status_vector: PISC_STATUS;
00435 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
00436 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
00437 bpb_buffer: PChar): ISC_STATUS;
00438 function isc_create_blob2(status_vector: PISC_STATUS;
00439 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
00440 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
00441 bpb_address: PChar): ISC_STATUS;
00442 function isc_blob_info(status_vector: PISC_STATUS;
00443 blob_handle: PISC_BLOB_HANDLE; item_list_buffer_length: Short;
00444 item_list_buffer: PChar; result_buffer_length: Short; result_buffer: PChar): PISC_STATUS;
00445 function isc_close_blob(status_vector: PISC_STATUS;
00446 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
00447 function isc_cancel_blob(status_vector: PISC_STATUS;
00448 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
00449 function isc_get_segment(status_vector: PISC_STATUS;
00450 blob_handle: PISC_BLOB_HANDLE; actual_seg_length: PWord;
00451 seg_buffer_length: Word; seg_buffer: PChar): ISC_STATUS;
00452 function isc_put_segment(status_vector: PISC_STATUS;
00453 blob_handle: PISC_BLOB_HANDLE; seg_buffer_len: Word; seg_buffer: PChar): ISC_STATUS;
00454 function isc_event_block(event_buffer: PPChar; result_buffer: PPChar;
00455 id_count: Word; event_list: array of PChar): ISC_LONG;
00456 procedure isc_event_counts(status_vector: PISC_STATUS;
00457 buffer_length: Short; event_buffer: PChar; result_buffer: PChar);
00458 function isc_cancel_events(status_vector: PISC_STATUS;
00459 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG): ISC_STATUS;
00460 function isc_que_events(status_vector: PISC_STATUS;
00461 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG; length: Short;
00462 event_buffer: PChar; event_function: TISC_CALLBACK;
00463 event_function_arg: PVoid): ISC_STATUS;
00464 procedure isc_decode_date(ib_date: PISC_QUAD; tm_date: PCTimeStructure);
00465 procedure isc_encode_date(tm_date: PCTimeStructure; ib_date: PISC_QUAD);
00466 function isc_vax_integer(buffer: PChar; length: Short): ISC_LONG;
00467
00468 procedure isc_decode_sql_date(ib_date: PISC_DATE; tm_date: PCTimeStructure);
00469 procedure isc_decode_sql_time(ib_time: PISC_TIME; tm_date: PCTimeStructure);
00470 procedure isc_decode_timestamp(ib_timestamp: PISC_TIMESTAMP;
00471 tm_date: PCTimeStructure);
00472 procedure isc_encode_sql_date(tm_date: PCTimeStructure;
00473 ib_date: PISC_DATE);
00474 procedure isc_encode_sql_time(tm_date: PCTimeStructure;
00475 ib_time: PISC_TIME);
00476 procedure isc_encode_timestamp(tm_date: PCTimeStructure;
00477 ib_timestamp: PISC_TIMESTAMP);
00478 end;
00479
00480 function XSQLDA_LENGTH(Value: LongInt): LongInt;
00481
00482 implementation
00483
00484 uses SysUtils, ZPlainInterbase5, ZPlainInterbase6;
00485
00486 function XSQLDA_LENGTH(Value: LongInt): LongInt;
00487 begin
00488 Result := SizeOf(TXSQLDA) + ((Value - 1) * SizeOf(TXSQLVAR));
00489 end;
00490
00491 { IZInterbase6PlainDriver }
00492
00493 constructor TZInterbase6PlainDriver.Create;
00494 begin
00495
00496 end;
00497
00498 function TZInterbase6PlainDriver.GetDescription: string;
00499 begin
00500 Result := 'Native Plain Driver for Interbase 6+';
00501 end;
00502
00503 function TZInterbase6PlainDriver.GetProtocol: string;
00504 begin
00505 Result := 'interbase-6';
00506 end;
00507
00508 procedure TZInterbase6PlainDriver.Initialize;
00509 begin
00510 ZPlainInterbase6.LibraryLoader.LoadIfNeeded;
00511 end;
00512
00513 function TZInterbase6PlainDriver.isc_array_gen_sdl(status_vector: PISC_STATUS;
00514 isc_array_desc: PISC_ARRAY_DESC; isc_arg3: PShort;
00515 isc_arg4: PChar; isc_arg5: PShort): ISC_STATUS;
00516 begin
00517 Result := ZPlainInterbase6.isc_array_gen_sdl(status_vector, isc_array_desc,
00518 isc_arg3, isc_arg4, isc_arg5);
00519 end;
00520
00521 function TZInterbase6PlainDriver.isc_array_get_slice(status_vector: PISC_STATUS;
00522 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE; array_id: PISC_QUAD;
00523 descriptor: PISC_ARRAY_DESC; dest_array: PVoid;
00524 slice_length: ISC_LONG): ISC_STATUS;
00525 begin
00526 Result := ZPlainInterbase6.isc_array_get_slice(status_vector, db_handle,
00527 trans_handle, array_id, descriptor, dest_array, slice_length);
00528 end;
00529
00530 function TZInterbase6PlainDriver.isc_array_lookup_bounds(
00531 status_vector: PISC_STATUS; db_handle: PISC_DB_HANDLE;
00532 trans_handle: PISC_TR_HANDLE; table_name, column_name: PChar;
00533 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00534 begin
00535 Result := ZPlainInterbase6.isc_array_lookup_bounds(status_vector, db_handle,
00536 trans_handle, table_name, column_name, descriptor);
00537 end;
00538
00539 function TZInterbase6PlainDriver.isc_array_lookup_desc(
00540 status_vector: PISC_STATUS; db_handle: PISC_DB_HANDLE;
00541 trans_handle: PISC_TR_HANDLE; table_name, column_name: PChar;
00542 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00543 begin
00544 Result := ZPlainInterbase6.isc_array_lookup_desc(status_vector, db_handle,
00545 trans_handle, table_name, column_name, descriptor);
00546 end;
00547
00548 function TZInterbase6PlainDriver.isc_array_put_slice(status_vector: PISC_STATUS;
00549 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE; array_id: PISC_QUAD;
00550 descriptor: PISC_ARRAY_DESC; source_array: PVoid;
00551 slice_length: PISC_LONG): ISC_STATUS;
00552 begin
00553 Result := ZPlainInterbase6.isc_array_put_slice(status_vector, db_handle,
00554 trans_handle, array_id, descriptor, source_array, slice_length);
00555 end;
00556
00557 function TZInterbase6PlainDriver.isc_array_set_desc(status_vector: PISC_STATUS;
00558 table_name, column_name: PChar; sql_dtype, sql_length, sql_dimensions: PShort;
00559 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00560 begin
00561 Result := ZPlainInterbase6.isc_array_set_desc(status_vector, table_name,
00562 column_name, sql_dtype, sql_length, sql_dimensions, descriptor);
00563 end;
00564
00565 function TZInterbase6PlainDriver.isc_attach_database(status_vector: PISC_STATUS;
00566 db_name_length: Short; db_name: PChar; db_handle: PISC_DB_HANDLE;
00567 parm_buffer_length: Short; parm_buffer: PChar): ISC_STATUS;
00568 begin
00569 Result := ZPlainInterbase6.isc_attach_database(status_vector, db_name_length,
00570 db_name, db_handle, parm_buffer_length, parm_buffer);
00571 end;
00572
00573 function TZInterbase6PlainDriver.isc_blob_info(status_vector: PISC_STATUS;
00574 blob_handle: PISC_BLOB_HANDLE; item_list_buffer_length: Short;
00575 item_list_buffer: PChar; result_buffer_length: Short;
00576 result_buffer: PChar): PISC_STATUS;
00577 begin
00578 Result := PISC_STATUS(ZPlainInterbase6.isc_blob_info(status_vector, blob_handle,
00579 item_list_buffer_length, item_list_buffer, result_buffer_length,
00580 result_buffer));
00581 end;
00582
00583 function TZInterbase6PlainDriver.isc_cancel_blob(status_vector: PISC_STATUS;
00584 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
00585 begin
00586 Result := ZPlainInterbase6.isc_cancel_blob(status_vector, blob_handle);
00587 end;
00588
00589 function TZInterbase6PlainDriver.isc_cancel_events(status_vector: PISC_STATUS;
00590 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG): ISC_STATUS;
00591 begin
00592 Result := ZPlainInterbase6.isc_cancel_events(status_vector, db_handle,
00593 event_id);
00594 end;
00595
00596 function TZInterbase6PlainDriver.isc_close_blob(status_vector: PISC_STATUS;
00597 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
00598 begin
00599 Result := ZPlainInterbase6.isc_close_blob(status_vector, blob_handle);
00600 end;
00601
00602 function TZInterbase6PlainDriver.isc_commit_retaining(
00603 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00604 begin
00605 Result := ZPlainInterbase6.isc_commit_retaining(status_vector, tran_handle);
00606 end;
00607
00608 function TZInterbase6PlainDriver.isc_commit_transaction(
00609 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00610 begin
00611 Result := ZPlainInterbase6.isc_commit_transaction(status_vector, tran_handle);
00612 end;
00613
00614 function TZInterbase6PlainDriver.isc_create_blob2(status_vector: PISC_STATUS;
00615 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
00616 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
00617 bpb_address: PChar): ISC_STATUS;
00618 begin
00619 Result := ZPlainInterbase6.isc_create_blob2(status_vector, db_handle,
00620 tran_handle, blob_handle, blob_id, bpb_length, bpb_address);
00621 end;
00622
00623 function TZInterbase6PlainDriver.isc_database_info(status_vector: PISC_STATUS;
00624 db_handle: PISC_DB_HANDLE; item_list_buffer_length: Short;
00625 item_list_buffer: PChar; result_buffer_length: Short;
00626 result_buffer: PChar): ISC_STATUS;
00627 begin
00628 Result := ZPlainInterbase6.isc_database_info(status_vector, db_handle,
00629 item_list_buffer_length, item_list_buffer, result_buffer_length,
00630 result_buffer);
00631 end;
00632
00633 procedure TZInterbase6PlainDriver.isc_decode_date(ib_date: PISC_QUAD;
00634 tm_date: PCTimeStructure);
00635 begin
00636 ZPlainInterbase6.isc_decode_date(ib_date, tm_date);
00637 end;
00638
00639 procedure TZInterbase6PlainDriver.isc_decode_sql_date(ib_date: PISC_DATE;
00640 tm_date: PCTimeStructure);
00641 begin
00642 ZPlainInterbase6.isc_decode_sql_date(ib_date, tm_date);
00643 end;
00644
00645 procedure TZInterbase6PlainDriver.isc_decode_sql_time(ib_time: PISC_TIME;
00646 tm_date: PCTimeStructure);
00647 begin
00648 ZPlainInterbase6.isc_decode_sql_time(ib_time, tm_date);
00649 end;
00650
00651 procedure TZInterbase6PlainDriver.isc_decode_timestamp(
00652 ib_timestamp: PISC_TIMESTAMP; tm_date: PCTimeStructure);
00653 begin
00654 ZPlainInterbase6.isc_decode_timestamp(ib_timestamp, tm_date);
00655 end;
00656
00657 function TZInterbase6PlainDriver.isc_detach_database(status_vector: PISC_STATUS;
00658 db_handle: PISC_DB_HANDLE): ISC_STATUS;
00659 begin
00660 Result := ZPlainInterbase6.isc_detach_database(status_vector, db_handle);
00661 end;
00662
00663 function TZInterbase6PlainDriver.isc_drop_database(status_vector: PISC_STATUS;
00664 db_handle: PISC_DB_HANDLE): ISC_STATUS;
00665 begin
00666 Result := ZPlainInterbase6.isc_drop_database(status_vector, db_handle);
00667 end;
00668
00669 function TZInterbase6PlainDriver.isc_dsql_alloc_statement2(
00670 status_vector: PISC_STATUS; db_handle: PISC_DB_HANDLE;
00671 stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
00672 begin
00673 Result := ZPlainInterbase6.isc_dsql_alloc_statement2(status_vector,
00674 db_handle, stmt_handle);
00675 end;
00676
00677 function TZInterbase6PlainDriver.isc_dsql_allocate_statement(
00678 status_vector: PISC_STATUS; db_handle: PISC_DB_HANDLE;
00679 stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
00680 begin
00681 Result := ZPlainInterbase6.isc_dsql_allocate_statement(status_vector,
00682 db_handle, stmt_handle);
00683 end;
00684
00685 function TZInterbase6PlainDriver.isc_dsql_describe(status_vector: PISC_STATUS;
00686 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00687 begin
00688 Result := ZPlainInterbase6.isc_dsql_describe(status_vector, stmt_handle,
00689 dialect, xsqlda);
00690 end;
00691
00692 function TZInterbase6PlainDriver.isc_dsql_describe_bind(
00693 status_vector: PISC_STATUS; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
00694 xsqlda: PXSQLDA): ISC_STATUS;
00695 begin
00696 Result := ZPlainInterbase6.isc_dsql_describe_bind(status_vector, stmt_handle,
00697 dialect, xsqlda);
00698 end;
00699
00700 function TZInterbase6PlainDriver.isc_dsql_execute(status_vector: PISC_STATUS;
00701 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
00702 xsqlda: PXSQLDA): ISC_STATUS;
00703 begin
00704 Result := ZPlainInterbase6.isc_dsql_execute(status_vector, tran_handle,
00705 stmt_handle, dialect, xsqlda);
00706 end;
00707
00708 function TZInterbase6PlainDriver.isc_dsql_execute_immediate(
00709 status_vector: PISC_STATUS; db_handle: PISC_DB_HANDLE;
00710 tran_handle: PISC_TR_HANDLE; length: Word; statement: PChar;
00711 dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00712 begin
00713 Result := ZPlainInterbase6.isc_dsql_execute_immediate(status_vector,
00714 db_handle, tran_handle, length, statement, dialect, xsqlda);
00715 end;
00716
00717 function TZInterbase6PlainDriver.isc_dsql_execute2(status_vector: PISC_STATUS;
00718 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE;
00719 dialect: Word; in_xsqlda, out_xsqlda: PXSQLDA): ISC_STATUS;
00720 begin
00721 Result := ZPlainInterbase6.isc_dsql_execute2(status_vector, tran_handle,
00722 stmt_handle, dialect, in_xsqlda, out_xsqlda);
00723 end;
00724
00725 function TZInterbase6PlainDriver.isc_dsql_fetch(status_vector: PISC_STATUS;
00726 stmt_handle: PISC_STMT_HANDLE; dialect: Word;
00727 xsqlda: PXSQLDA): ISC_STATUS;
00728 begin
00729 Result := ZPlainInterbase6.isc_dsql_fetch(status_vector, stmt_handle, dialect,
00730 xsqlda);
00731 end;
00732
00733 function TZInterbase6PlainDriver.isc_dsql_free_statement(
00734 status_vector: PISC_STATUS; stmt_handle: PISC_STMT_HANDLE;
00735 options: Word): ISC_STATUS;
00736 begin
00737 Result := ZPlainInterbase6.isc_dsql_free_statement(status_vector, stmt_handle,
00738 options);
00739 end;
00740
00741 function TZInterbase6PlainDriver.isc_dsql_prepare(
00742 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE;
00743 stmt_handle: PISC_STMT_HANDLE; length: Word; statement: PChar;
00744 dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
00745 begin
00746 Result := ZPlainInterbase6.isc_dsql_prepare(status_vector, tran_handle,
00747 stmt_handle, length, statement, dialect, xsqlda);
00748 end;
00749
00750 function TZInterbase6PlainDriver.isc_dsql_set_cursor_name(
00751 status_vector: PISC_STATUS; stmt_handle: PISC_STMT_HANDLE;
00752 cursor_name: PChar; _type: Word): ISC_STATUS;
00753 begin
00754 Result := ZPlainInterbase6.isc_dsql_set_cursor_name(status_vector,
00755 stmt_handle, cursor_name, _type);
00756 end;
00757
00758 function TZInterbase6PlainDriver.isc_dsql_sql_info(
00759 status_vector: PISC_STATUS; stmt_handle: PISC_STMT_HANDLE;
00760 item_length: Short; items: PChar; buffer_length: Short;
00761 buffer: PChar): ISC_STATUS;
00762 begin
00763 Result := ZPlainInterbase6.isc_dsql_sql_info(status_vector, stmt_handle,
00764 item_length, items, buffer_length, buffer);
00765 end;
00766
00767 procedure TZInterbase6PlainDriver.isc_encode_date(tm_date: PCTimeStructure;
00768 ib_date: PISC_QUAD);
00769 begin
00770 ZPlainInterbase6.isc_encode_date(tm_date, ib_date);
00771 end;
00772
00773 procedure TZInterbase6PlainDriver.isc_encode_sql_date(
00774 tm_date: PCTimeStructure; ib_date: PISC_DATE);
00775 begin
00776 ZPlainInterbase6.isc_encode_sql_date(tm_date, ib_date);
00777 end;
00778
00779 procedure TZInterbase6PlainDriver.isc_encode_sql_time(
00780 tm_date: PCTimeStructure; ib_time: PISC_TIME);
00781 begin
00782 ZPlainInterbase6.isc_encode_sql_time(tm_date, ib_time);
00783 end;
00784
00785 procedure TZInterbase6PlainDriver.isc_encode_timestamp(
00786 tm_date: PCTimeStructure; ib_timestamp: PISC_TIMESTAMP);
00787 begin
00788 ZPlainInterbase6.isc_encode_timestamp(tm_date, ib_timestamp);
00789 end;
00790
00791 function TZInterbase6PlainDriver.isc_event_block(event_buffer,
00792 result_buffer: PPChar; id_count: Word;
00793 event_list: array of PChar): ISC_LONG;
00794 begin
00795 Result := ZPlainInterbase6.isc_event_block(event_buffer, result_buffer,
00796 id_count, event_list);
00797 end;
00798
00799 procedure TZInterbase6PlainDriver.isc_event_counts(
00800 status_vector: PISC_STATUS; buffer_length: Short; event_buffer,
00801 result_buffer: PChar);
00802 begin
00803 ZPlainInterbase6.isc_event_counts(status_vector, buffer_length,
00804 event_buffer, result_buffer);
00805 end;
00806
00807 function TZInterbase6PlainDriver.isc_free(isc_arg1: PChar): ISC_LONG;
00808 begin
00809 Result := ZPlainInterbase6.isc_free(isc_arg1);
00810 end;
00811
00812 function TZInterbase6PlainDriver.isc_get_segment(
00813 status_vector: PISC_STATUS; blob_handle: PISC_BLOB_HANDLE;
00814 actual_seg_length: PWord; seg_buffer_length: Word;
00815 seg_buffer: PChar): ISC_STATUS;
00816 begin
00817 Result := ZPlainInterbase6.isc_get_segment(status_vector, blob_handle,
00818 actual_seg_length, seg_buffer_length, seg_buffer);
00819 end;
00820
00821 function TZInterbase6PlainDriver.isc_interprete(buffer: PChar;
00822 status_vector: PPISC_STATUS): ISC_STATUS;
00823 begin
00824 Result := ZPlainInterbase6.isc_interprete(buffer, status_vector);
00825 end;
00826
00827 function TZInterbase6PlainDriver.isc_open_blob2(status_vector: PISC_STATUS;
00828 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
00829 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
00830 bpb_buffer: PChar): ISC_STATUS;
00831 begin
00832 Result := ZPlainInterbase6.isc_open_blob2(status_vector, db_handle,
00833 tran_handle, blob_handle, blob_id, bpb_length, bpb_buffer);
00834 end;
00835
00836 function TZInterbase6PlainDriver.isc_put_segment(
00837 status_vector: PISC_STATUS; blob_handle: PISC_BLOB_HANDLE;
00838 seg_buffer_len: Word; seg_buffer: PChar): ISC_STATUS;
00839 begin
00840 Result := ZPlainInterbase6.isc_put_segment(status_vector, blob_handle,
00841 seg_buffer_len, seg_buffer);
00842 end;
00843
00844 function TZInterbase6PlainDriver.isc_que_events(status_vector: PISC_STATUS;
00845 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG; length: Short;
00846 event_buffer: PChar; event_function: TISC_CALLBACK;
00847 event_function_arg: PVoid): ISC_STATUS;
00848 begin
00849 Result := ZPlainInterbase6.isc_que_events(status_vector, db_handle,
00850 event_id, length, event_buffer, event_function, event_function_arg)
00851 end;
00852
00853 function TZInterbase6PlainDriver.isc_rollback_retaining(
00854 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00855 begin
00856 Result := ZPlainInterbase6.isc_rollback_retaining(status_vector, tran_handle);
00857 end;
00858
00859 procedure TZInterbase6PlainDriver.isc_sql_interprete(sqlcode: Short;
00860 buffer: PChar; buffer_length: Short);
00861 begin
00862 ZPlainInterbase6.isc_sql_interprete(sqlcode, buffer, buffer_length);
00863 end;
00864
00865 function TZInterbase6PlainDriver.isc_sqlcode(
00866 status_vector: PISC_STATUS): ISC_LONG;
00867 begin
00868 Result := ZPlainInterbase6.isc_sqlcode(status_vector);
00869 end;
00870
00871 function TZInterbase6PlainDriver.isc_rollback_transaction(
00872 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE): ISC_STATUS;
00873 begin
00874 Result := ZPlainInterbase6.isc_rollback_transaction(status_vector, tran_handle);
00875 end;
00876
00877 function TZInterbase6PlainDriver.isc_start_multiple(
00878 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE;
00879 db_handle_count: Short; teb_vector_address: PISC_TEB): ISC_STATUS;
00880 begin
00881 Result := ZPlainInterbase6.isc_start_multiple(status_vector, tran_handle,
00882 db_handle_count, teb_vector_address);
00883 end;
00884
00885 function TZInterbase6PlainDriver.isc_start_transaction(
00886 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE;
00887 db_handle_count: Short; db_handle: PISC_DB_HANDLE; tpb_length: Word;
00888 tpb_address: PChar): ISC_STATUS;
00889 begin
00890 Result := ZPlainInterbase6.isc_start_transaction(status_vector, tran_handle,
00891 db_handle_count, db_handle, tpb_length, tpb_address);
00892 end;
00893
00894 function TZInterbase6PlainDriver.isc_vax_integer(buffer: PChar;
00895 length: Short): ISC_LONG;
00896 begin
00897 Result := ZPlainInterbase6.isc_vax_integer(buffer, length);
00898 end;
00899
00900 { TZInterbase5PlainDriver }
00901
00902 constructor TZInterbase5PlainDriver.Create;
00903 begin
00904
00905 end;
00906
00907 function TZInterbase5PlainDriver.GetDescription: string;
00908 begin
00909 Result := 'Native Plain Driver for Interbase 5+';
00910 end;
00911
00912 function TZInterbase5PlainDriver.GetProtocol: string;
00913 begin
00914 Result := 'interbase-5';
00915 end;
00916
00917 procedure TZInterbase5PlainDriver.Initialize;
00918 begin
00919 ZPlainInterbase5.LibraryLoader.LoadIfNeeded;
00920 end;
00921
00922 function TZInterbase5PlainDriver.isc_array_gen_sdl(status_vector: PISC_STATUS;
00923 isc_array_desc: PISC_ARRAY_DESC; isc_arg3: PShort;
00924 isc_arg4: PChar; isc_arg5: PShort): ISC_STATUS;
00925 begin
00926 Result := ZPlainInterbase5.isc_array_gen_sdl(status_vector, isc_array_desc,
00927 isc_arg3, isc_arg4, isc_arg5);
00928 end;
00929
00930 function TZInterbase5PlainDriver.isc_array_get_slice(status_vector: PISC_STATUS;
00931 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE; array_id: PISC_QUAD;
00932 descriptor: PISC_ARRAY_DESC; dest_array: PVoid;
00933 slice_length: ISC_LONG): ISC_STATUS;
00934 begin
00935 Result := ZPlainInterbase5.isc_array_get_slice(status_vector, db_handle,
00936 trans_handle, array_id, descriptor, dest_array, slice_length);
00937 end;
00938
00939 function TZInterbase5PlainDriver.isc_array_lookup_bounds(
00940 status_vector: PISC_STATUS; db_handle: PISC_DB_HANDLE;
00941 trans_handle: PISC_TR_HANDLE; table_name, column_name: PChar;
00942 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00943 begin
00944 Result := ZPlainInterbase5.isc_array_lookup_bounds(status_vector, db_handle,
00945 trans_handle, table_name, column_name, descriptor);
00946 end;
00947
00948 function TZInterbase5PlainDriver.isc_array_lookup_desc(
00949 status_vector: PISC_STATUS; db_handle: PISC_DB_HANDLE;
00950 trans_handle: PISC_TR_HANDLE; table_name, column_name: PChar;
00951 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00952 begin
00953 Result := ZPlainInterbase5.isc_array_lookup_desc(status_vector, db_handle,
00954 trans_handle, table_name, column_name, descriptor);
00955 end;
00956
00957 function TZInterbase5PlainDriver.isc_array_put_slice(status_vector: PISC_STATUS;
00958 db_handle: PISC_DB_HANDLE; trans_handle: PISC_TR_HANDLE; array_id: PISC_QUAD;
00959 descriptor: PISC_ARRAY_DESC; source_array: PVoid;
00960 slice_length: PISC_LONG): ISC_STATUS;
00961 begin
00962 Result := ZPlainInterbase5.isc_array_put_slice(status_vector, db_handle,
00963 trans_handle, array_id, descriptor, source_array, slice_length);
00964 end;
00965
00966 function TZInterbase5PlainDriver.isc_array_set_desc(status_vector: PISC_STATUS;
00967 table_name, column_name: PChar; sql_dtype, sql_length, sql_dimensions: PShort;
00968 descriptor: PISC_ARRAY_DESC): ISC_STATUS;
00969 begin
00970 Result := ZPlainInterbase5.isc_array_set_desc(status_vector, table_name,
00971 column_name, sql_dtype, sql_length, sql_dimensions, descriptor);
00972 end;
00973
00974 function TZInterbase5PlainDriver.isc_attach_database(status_vector: PISC_STATUS;
00975 db_name_length: Short; db_name: PChar; db_handle: PISC_DB_HANDLE;
00976 parm_buffer_length: Short; parm_buffer: PChar): ISC_STATUS;
00977 begin
00978 Result := ZPlainInterbase5.isc_attach_database(status_vector, db_name_length,
00979 db_name, db_handle, parm_buffer_length, parm_buffer);
00980 end;
00981
00982 function TZInterbase5PlainDriver.isc_blob_info(status_vector: PISC_STATUS;
00983 blob_handle: PISC_BLOB_HANDLE; item_list_buffer_length: Short;
00984 item_list_buffer: PChar; result_buffer_length: Short;
00985 result_buffer: PChar): PISC_STATUS;
00986 begin
00987 Result := PISC_STATUS(ZPlainInterbase5.isc_blob_info(status_vector, blob_handle,
00988 item_list_buffer_length, item_list_buffer, result_buffer_length,
00989 result_buffer));
00990 end;
00991
00992 function TZInterbase5PlainDriver.isc_cancel_blob(status_vector: PISC_STATUS;
00993 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
00994 begin
00995 Result := ZPlainInterbase5.isc_cancel_blob(status_vector, blob_handle);
00996 end;
00997
00998 function TZInterbase5PlainDriver.isc_cancel_events(status_vector: PISC_STATUS;
00999 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG): ISC_STATUS;
01000 begin
01001 Result := ZPlainInterbase5.isc_cancel_events(status_vector, db_handle,
01002 event_id);
01003 end;
01004
01005 function TZInterbase5PlainDriver.isc_close_blob(status_vector: PISC_STATUS;
01006 blob_handle: PISC_BLOB_HANDLE): ISC_STATUS;
01007 begin
01008 Result := ZPlainInterbase5.isc_close_blob(status_vector, blob_handle);
01009 end;
01010
01011 function TZInterbase5PlainDriver.isc_commit_retaining(
01012 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE): ISC_STATUS;
01013 begin
01014 Result := ZPlainInterbase5.isc_commit_retaining(status_vector, tran_handle);
01015 end;
01016
01017 function TZInterbase5PlainDriver.isc_commit_transaction(
01018 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE): ISC_STATUS;
01019 begin
01020 Result := ZPlainInterbase5.isc_commit_transaction(status_vector, tran_handle);
01021 end;
01022
01023 function TZInterbase5PlainDriver.isc_create_blob2(status_vector: PISC_STATUS;
01024 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
01025 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
01026 bpb_address: PChar): ISC_STATUS;
01027 begin
01028 Result := ZPlainInterbase5.isc_create_blob2(status_vector, db_handle,
01029 tran_handle, blob_handle, blob_id, bpb_length, bpb_address);
01030 end;
01031
01032 function TZInterbase5PlainDriver.isc_database_info(status_vector: PISC_STATUS;
01033 db_handle: PISC_DB_HANDLE; item_list_buffer_length: Short;
01034 item_list_buffer: PChar; result_buffer_length: Short;
01035 result_buffer: PChar): ISC_STATUS;
01036 begin
01037 Result := ZPlainInterbase5.isc_database_info(status_vector, db_handle,
01038 item_list_buffer_length, item_list_buffer, result_buffer_length,
01039 result_buffer);
01040 end;
01041
01042 procedure TZInterbase5PlainDriver.isc_decode_date(ib_date: PISC_QUAD;
01043 tm_date: PCTimeStructure);
01044 begin
01045 ZPlainInterbase5.isc_decode_date(ib_date, tm_date);
01046 end;
01047
01048 function TZInterbase5PlainDriver.isc_detach_database(status_vector: PISC_STATUS;
01049 db_handle: PISC_DB_HANDLE): ISC_STATUS;
01050 begin
01051 Result := ZPlainInterbase5.isc_detach_database(status_vector, db_handle);
01052 end;
01053
01054 function TZInterbase5PlainDriver.isc_drop_database(status_vector: PISC_STATUS;
01055 db_handle: PISC_DB_HANDLE): ISC_STATUS;
01056 begin
01057 Result := ZPlainInterbase5.isc_drop_database(status_vector, db_handle);
01058 end;
01059
01060 function TZInterbase5PlainDriver.isc_dsql_alloc_statement2(
01061 status_vector: PISC_STATUS; db_handle: PISC_DB_HANDLE;
01062 stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
01063 begin
01064 Result := ZPlainInterbase5.isc_dsql_alloc_statement2(status_vector,
01065 db_handle, stmt_handle);
01066 end;
01067
01068 function TZInterbase5PlainDriver.isc_dsql_allocate_statement(
01069 status_vector: PISC_STATUS; db_handle: PISC_DB_HANDLE;
01070 stmt_handle: PISC_STMT_HANDLE): ISC_STATUS;
01071 begin
01072 Result := ZPlainInterbase5.isc_dsql_allocate_statement(status_vector,
01073 db_handle, stmt_handle);
01074 end;
01075
01076 function TZInterbase5PlainDriver.isc_dsql_describe(status_vector: PISC_STATUS;
01077 stmt_handle: PISC_STMT_HANDLE; dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
01078 begin
01079 Result := ZPlainInterbase5.isc_dsql_describe(status_vector, stmt_handle,
01080 dialect, xsqlda);
01081 end;
01082
01083 function TZInterbase5PlainDriver.isc_dsql_describe_bind(
01084 status_vector: PISC_STATUS; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
01085 xsqlda: PXSQLDA): ISC_STATUS;
01086 begin
01087 Result := ZPlainInterbase5.isc_dsql_describe_bind(status_vector, stmt_handle,
01088 dialect, xsqlda);
01089 end;
01090
01091 function TZInterbase5PlainDriver.isc_dsql_execute(status_vector: PISC_STATUS;
01092 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE; dialect: Word;
01093 xsqlda: PXSQLDA): ISC_STATUS;
01094 begin
01095 Result := ZPlainInterbase5.isc_dsql_execute(status_vector, tran_handle,
01096 stmt_handle, dialect, xsqlda);
01097 end;
01098
01099 function TZInterbase5PlainDriver.isc_dsql_execute_immediate(
01100 status_vector: PISC_STATUS; db_handle: PISC_DB_HANDLE;
01101 tran_handle: PISC_TR_HANDLE; length: Word; statement: PChar;
01102 dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
01103 begin
01104 Result := ZPlainInterbase5.isc_dsql_execute_immediate(status_vector,
01105 db_handle, tran_handle, length, statement, dialect, xsqlda);
01106 end;
01107
01108 function TZInterbase5PlainDriver.isc_dsql_execute2(status_vector: PISC_STATUS;
01109 tran_handle: PISC_TR_HANDLE; stmt_handle: PISC_STMT_HANDLE;
01110 dialect: Word; in_xsqlda, out_xsqlda: PXSQLDA): ISC_STATUS;
01111 begin
01112 Result := ZPlainInterbase5.isc_dsql_execute2(status_vector, tran_handle,
01113 stmt_handle, dialect, in_xsqlda, out_xsqlda);
01114 end;
01115
01116 function TZInterbase5PlainDriver.isc_dsql_fetch(status_vector: PISC_STATUS;
01117 stmt_handle: PISC_STMT_HANDLE; dialect: Word;
01118 xsqlda: PXSQLDA): ISC_STATUS;
01119 begin
01120 Result := ZPlainInterbase5.isc_dsql_fetch(status_vector, stmt_handle, dialect,
01121 xsqlda);
01122 end;
01123
01124 function TZInterbase5PlainDriver.isc_dsql_free_statement(
01125 status_vector: PISC_STATUS; stmt_handle: PISC_STMT_HANDLE;
01126 options: Word): ISC_STATUS;
01127 begin
01128 Result := ZPlainInterbase5.isc_dsql_free_statement(status_vector, stmt_handle,
01129 options);
01130 end;
01131
01132 function TZInterbase5PlainDriver.isc_dsql_prepare(
01133 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE;
01134 stmt_handle: PISC_STMT_HANDLE; length: Word; statement: PChar;
01135 dialect: Word; xsqlda: PXSQLDA): ISC_STATUS;
01136 begin
01137 Result := ZPlainInterbase5.isc_dsql_prepare(status_vector, tran_handle,
01138 stmt_handle, length, statement, dialect, xsqlda);
01139 end;
01140
01141 function TZInterbase5PlainDriver.isc_dsql_set_cursor_name(
01142 status_vector: PISC_STATUS; stmt_handle: PISC_STMT_HANDLE;
01143 cursor_name: PChar; _type: Word): ISC_STATUS;
01144 begin
01145 Result := ZPlainInterbase5.isc_dsql_set_cursor_name(status_vector,
01146 stmt_handle, cursor_name, _type);
01147 end;
01148
01149 function TZInterbase5PlainDriver.isc_dsql_sql_info(
01150 status_vector: PISC_STATUS; stmt_handle: PISC_STMT_HANDLE;
01151 item_length: Short; items: PChar; buffer_length: Short;
01152 buffer: PChar): ISC_STATUS;
01153 begin
01154 Result := ZPlainInterbase5.isc_dsql_sql_info(status_vector, stmt_handle,
01155 item_length, items, buffer_length, buffer);
01156 end;
01157
01158 procedure TZInterbase5PlainDriver.isc_encode_date(tm_date: PCTimeStructure;
01159 ib_date: PISC_QUAD);
01160 begin
01161 ZPlainInterbase5.isc_encode_date(tm_date, ib_date);
01162 end;
01163
01164 function TZInterbase5PlainDriver.isc_event_block(event_buffer,
01165 result_buffer: PPChar; id_count: Word;
01166 event_list: array of PChar): ISC_LONG;
01167 begin
01168 Result := ZPlainInterbase5.isc_event_block(event_buffer, result_buffer,
01169 id_count, event_list);
01170 end;
01171
01172 procedure TZInterbase5PlainDriver.isc_event_counts(
01173 status_vector: PISC_STATUS; buffer_length: Short; event_buffer,
01174 result_buffer: PChar);
01175 begin
01176 ZPlainInterbase5.isc_event_counts(status_vector, buffer_length,
01177 event_buffer, result_buffer);
01178 end;
01179
01180 function TZInterbase5PlainDriver.isc_free(isc_arg1: PChar): ISC_LONG;
01181 begin
01182 Result := ZPlainInterbase5.isc_free(isc_arg1);
01183 end;
01184
01185 function TZInterbase5PlainDriver.isc_get_segment(
01186 status_vector: PISC_STATUS; blob_handle: PISC_BLOB_HANDLE;
01187 actual_seg_length: PWord; seg_buffer_length: Word;
01188 seg_buffer: PChar): ISC_STATUS;
01189 begin
01190 Result := ZPlainInterbase5.isc_get_segment(status_vector, blob_handle,
01191 actual_seg_length, seg_buffer_length, seg_buffer);
01192 end;
01193
01194 function TZInterbase5PlainDriver.isc_interprete(buffer: PChar;
01195 status_vector: PPISC_STATUS): ISC_STATUS;
01196 begin
01197 Result := ZPlainInterbase5.isc_interprete(buffer, status_vector);
01198 end;
01199
01200 function TZInterbase5PlainDriver.isc_open_blob2(status_vector: PISC_STATUS;
01201 db_handle: PISC_DB_HANDLE; tran_handle: PISC_TR_HANDLE;
01202 blob_handle: PISC_BLOB_HANDLE; blob_id: PISC_QUAD; bpb_length: Short;
01203 bpb_buffer: PChar): ISC_STATUS;
01204 begin
01205 Result := ZPlainInterbase5.isc_open_blob2(status_vector, db_handle,
01206 tran_handle, blob_handle, blob_id, bpb_length, bpb_buffer);
01207 end;
01208
01209 function TZInterbase5PlainDriver.isc_put_segment(
01210 status_vector: PISC_STATUS; blob_handle: PISC_BLOB_HANDLE;
01211 seg_buffer_len: Word; seg_buffer: PChar): ISC_STATUS;
01212 begin
01213 Result := ZPlainInterbase5.isc_put_segment(status_vector, blob_handle,
01214 seg_buffer_len, seg_buffer);
01215 end;
01216
01217 function TZInterbase5PlainDriver.isc_que_events(status_vector: PISC_STATUS;
01218 db_handle: PISC_DB_HANDLE; event_id: PISC_LONG; length: Short;
01219 event_buffer: PChar; event_function: TISC_CALLBACK;
01220 event_function_arg: PVoid): ISC_STATUS;
01221 begin
01222 Result := ZPlainInterbase5.isc_que_events(status_vector, db_handle,
01223 event_id, length, event_buffer, event_function, event_function_arg)
01224 end;
01225
01226 function TZInterbase5PlainDriver.isc_rollback_retaining(
01227 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE): ISC_STATUS;
01228 begin
01229 Result := ZPlainInterbase5.isc_rollback_retaining(status_vector, tran_handle);
01230 end;
01231
01232 procedure TZInterbase5PlainDriver.isc_sql_interprete(sqlcode: Short;
01233 buffer: PChar; buffer_length: Short);
01234 begin
01235 ZPlainInterbase5.isc_sql_interprete(sqlcode, buffer, buffer_length);
01236 end;
01237
01238 function TZInterbase5PlainDriver.isc_sqlcode(
01239 status_vector: PISC_STATUS): ISC_LONG;
01240 begin
01241 Result := ZPlainInterbase5.isc_sqlcode(status_vector);
01242 end;
01243
01244 function TZInterbase5PlainDriver.isc_rollback_transaction(
01245 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE): ISC_STATUS;
01246 begin
01247 Result := ZPlainInterbase5.isc_rollback_transaction(status_vector, tran_handle);
01248 end;
01249
01250 function TZInterbase5PlainDriver.isc_start_multiple(
01251 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE;
01252 db_handle_count: Short; teb_vector_address: PISC_TEB): ISC_STATUS;
01253 begin
01254 Result := ZPlainInterbase5.isc_start_multiple(status_vector, tran_handle,
01255 db_handle_count, teb_vector_address);
01256 end;
01257
01258 function TZInterbase5PlainDriver.isc_start_transaction(
01259 status_vector: PISC_STATUS; tran_handle: PISC_TR_HANDLE;
01260 db_handle_count: Short; db_handle: PISC_DB_HANDLE; tpb_length: Word;
01261 tpb_address: PChar): ISC_STATUS;
01262 begin
01263 Result := ZPlainInterbase5.isc_start_transaction(status_vector, tran_handle,
01264 db_handle_count, db_handle, tpb_length, tpb_address);
01265 end;
01266
01267 function TZInterbase5PlainDriver.isc_vax_integer(buffer: PChar;
01268 length: Short): ISC_LONG;
01269 begin
01270 Result := ZPlainInterbase5.isc_vax_integer(buffer, length);
01271 end;
01272
01273 procedure TZInterbase5PlainDriver.isc_decode_sql_date(ib_date: PISC_DATE;
01274 tm_date: PCTimeStructure);
01275 begin
01276 ZPlainInterbase5.isc_decode_sql_date_stub(ib_date, tm_date);
01277 end;
01278
01279 procedure TZInterbase5PlainDriver.isc_decode_sql_time(ib_time: PISC_TIME;
01280 tm_date: PCTimeStructure);
01281 begin
01282 ZPlainInterbase5.isc_decode_sql_time_stub(ib_time, tm_date);
01283 end;
01284
01285 procedure TZInterbase5PlainDriver.isc_decode_timestamp(
01286 ib_timestamp: PISC_TIMESTAMP; tm_date: PCTimeStructure);
01287 begin
01288 ZPlainInterbase5.isc_decode_timestamp_stub(ib_timestamp, tm_date);
01289 end;
01290
01291 procedure TZInterbase5PlainDriver.isc_encode_sql_date(
01292 tm_date: PCTimeStructure; ib_date: PISC_DATE);
01293 begin
01294 ZPlainInterbase5.isc_encode_sql_date_stub(tm_date, ib_date);
01295 end;
01296
01297 procedure TZInterbase5PlainDriver.isc_encode_sql_time(
01298 tm_date: PCTimeStructure; ib_time: PISC_TIME);
01299 begin
01300 ZPlainInterbase5.isc_encode_sql_time_stub(tm_date, ib_time);
01301 end;
01302
01303 procedure TZInterbase5PlainDriver.isc_encode_timestamp(
01304 tm_date: PCTimeStructure; ib_timestamp: PISC_TIMESTAMP);
01305 begin
01306 ZPlainInterbase5.isc_encode_timestamp_stub(tm_date, ib_timestamp);
01307 end;
01308
01309
01310
01311 end.
01312