1 {*********************************************************}
3 { Zeos Database Objects }
4 { Interbase Database Connectivity Classes }
6 { Originally written by Sergey Merkuriev }
8 {*********************************************************}
10 {@********************************************************}
11 { Copyright (c) 1999-2012 Zeos Development Group }
13 { License Agreement: }
15 { This library is distributed in the hope that it will be }
16 { useful, but WITHOUT ANY WARRANTY; without even the }
17 { implied warranty of MERCHANTABILITY or FITNESS FOR }
18 { A PARTICULAR PURPOSE. See the GNU Lesser General }
19 { Public License for more details. }
21 { The source code of the ZEOS Libraries and packages are }
22 { distributed under the Library GNU General Public }
23 { License (see the file COPYING / COPYING.ZEOS) }
24 { with the following modification: }
25 { As a special exception, the copyright holders of this }
26 { library give you permission to link this library with }
27 { independent modules to produce an executable, }
28 { regardless of the license terms of these independent }
29 { modules, and to copy and distribute the resulting }
30 { executable under terms of your choice, provided that }
31 { you also meet, for each linked independent module, }
32 { the terms and conditions of the license of that module. }
33 { An independent module is a module which is not derived }
34 { from or based on this library. If you modify this }
35 { library, you may extend this exception to your version }
36 { of the library, but you are not obligated to do so. }
37 { If you do not wish to do so, delete this exception }
38 { statement from your version. }
41 { The project web site is located on: }
42 { http://zeos.firmos.at (FORUM) }
43 { http://sourceforge.net/p/zeoslib/tickets/ (BUGTRACKER)}
44 { svn://svn.code.sf.net/p/zeoslib/code-0/trunk (SVN) }
46 { http://www.sourceforge.net/projects/zeoslib. }
49 { Zeos Development Group. }
50 {********************************************************@}
52 unit ZDbcInterbase6ResultSet;
59 {$IFDEF WITH_TOBJECTLIST_INLINE}System.Types, System.Contnrs{$ELSE}Types{$ENDIF},
60 Classes, {$IFDEF MSEgui}mclasses,{$ENDIF}
61 ZDbcIntfs, ZDbcResultSet, ZDbcInterbase6, ZPlainFirebirdInterbaseConstants,
62 ZPlainFirebirdDriver, ZCompatibility, ZDbcResultSetMetadata, ZMessages,
67 {** Implements Interbase ResultSet. }
68 TZInterbase6ResultSet = class(TZAbstractResultSet)
72 FCursorName: AnsiString;
73 FStmtHandle: TISC_STMT_HANDLE;
74 FSqlData: IZResultSQLDA;
75 FIBConnection: IZInterbase6Connection;
77 procedure Open; override;
78 function GetFieldValue(ColumnIndex: Integer): Variant;
79 function InternalGetString(ColumnIndex: Integer): RawByteString; override;
81 constructor Create(Statement: IZStatement; SQL: string;
82 var StatementHandle: TISC_STMT_HANDLE; CursorName: AnsiString;
83 SqlData: IZResultSQLDA; CachedBlob: boolean);
84 destructor Destroy; override;
86 procedure Close; override;
88 function GetCursorName: AnsiString; override;
90 function IsNull(ColumnIndex: Integer): Boolean; override;
91 function GetString(ColumnIndex: Integer): String; override;
92 function GetUnicodeString(ColumnIndex: Integer): WideString; override;
93 function GetBoolean(ColumnIndex: Integer): Boolean; override;
94 function GetByte(ColumnIndex: Integer): Byte; override;
95 function GetShort(ColumnIndex: Integer): SmallInt; override;
96 function GetInt(ColumnIndex: Integer): Integer; override;
97 function GetLong(ColumnIndex: Integer): Int64; override;
98 function GetFloat(ColumnIndex: Integer): Single; override;
99 function GetDouble(ColumnIndex: Integer): Double; override;
100 function GetBigDecimal(ColumnIndex: Integer): Extended; override;
101 function GetBytes(ColumnIndex: Integer): TByteDynArray; override;
102 function GetDate(ColumnIndex: Integer): TDateTime; override;
103 function GetTime(ColumnIndex: Integer): TDateTime; override;
104 function GetTimestamp(ColumnIndex: Integer): TDateTime; override;
105 function GetBlob(ColumnIndex: Integer): IZBlob; override;
107 function MoveAbsolute(Row: Integer): Boolean; override;
108 function Next: Boolean; override;
111 {** Implements external blob wrapper object for Intebase/Firbird. }
112 TZInterbase6Blob = class(TZAbstractBlob)
116 FIBConnection: IZInterbase6Connection;
120 constructor Create(IBConnection: IZInterbase6Connection;
121 var BlobId: TISC_QUAD);
123 function IsEmpty: Boolean; override;
124 function Clone: IZBlob; override;
125 function GetStream: TStream; override;
126 function GetString: RawByteString; override;
127 function GetUnicodeString: WideString; override;
128 function GetBytes: TByteDynArray; override;
137 SysUtils, ZDbcUtils, ZEncoding, ZDbcLogging;
139 { TZInterbase6ResultSet }
142 Releases this <code>ResultSet</code> object's database and
143 JDBC resources immediately instead of waiting for
144 this to happen when it is automatically closed.
146 <P><B>Note:</B> A <code>ResultSet</code> object
147 is automatically closed by the
148 <code>Statement</code> object that generated it when
149 that <code>Statement</code> object is closed,
150 re-executed, or is used to retrieve the next result from a
151 sequence of multiple results. A <code>ResultSet</code> object
152 is also automatically closed when it is garbage collected.
154 procedure TZInterbase6ResultSet.Close;
156 if FStmtHandle <> 0 then
158 { Free output allocated memory }
160 { Free allocate sql statement }
161 FreeStatement(FIBConnection.GetPlainDriver, FStmtHandle, DSQL_CLOSE); //AVZ
167 Constructs this object, assignes main properties and
168 opens the record set.
169 @param Statement a related SQL statement object.
170 @param handle a Interbase6 database connect handle.
171 @param the statement previously prepared
172 @param the sql out data previously allocated
173 @param the Interbase sql dialect
175 constructor TZInterbase6ResultSet.Create(Statement: IZStatement; SQL: string;
176 var StatementHandle: TISC_STMT_HANDLE; CursorName: AnsiString;
177 SqlData: IZResultSQLDA; CachedBlob: boolean);
179 inherited Create(Statement, SQL, nil,
180 Statement.GetConnection.GetConSettings);
184 FCursorName := CursorName;
185 FCachedBlob := CachedBlob;
186 FIBConnection := Statement.GetConnection as IZInterbase6Connection;
188 FStmtHandle := StatementHandle;
189 ResultSetType := rtForwardOnly;
190 ResultSetConcurrency := rcReadOnly;
196 Free memory and destriy component
198 destructor TZInterbase6ResultSet.Destroy;
206 Return field value by it index
207 @param the index column 0 first, 1 second ...
208 @return the field value as variant type
210 function TZInterbase6ResultSet.GetFieldValue(ColumnIndex: Integer): Variant;
213 Result := FSqlData.GetValue(ColumnIndex);
217 Gets the value of the designated column in the current row
218 of this <code>ResultSet</code> object as
219 a <code>java.sql.BigDecimal</code> in the Java programming language.
221 @param columnIndex the first column is 1, the second is 2, ...
222 @param scale the number of digits to the right of the decimal point
223 @return the column value; if the value is SQL <code>NULL</code>, the
224 value returned is <code>null</code>
226 function TZInterbase6ResultSet.GetBigDecimal(ColumnIndex: Integer): Extended;
229 {$IFNDEF DISABLE_CHECKING}
230 CheckColumnConvertion(ColumnIndex, stBigDecimal);
232 Result := FSqlData.GetBigDecimal(ColumnIndex - 1);
233 LastWasNull := IsNull(ColumnIndex);
237 Returns the value of the designated column in the current row
238 of this <code>ResultSet</code> object as a <code>Blob</code> object
239 in the Java programming language.
241 @param ColumnIndex the first column is 1, the second is 2, ...
242 @return a <code>Blob</code> object representing the SQL <code>BLOB</code> value in
248 function TZInterbase6ResultSet.GetBlob(ColumnIndex: Integer): IZBlob;
257 CheckBlobColumn(ColumnIndex);
259 LastWasNull := IsNull(ColumnIndex);
266 BlobId := FSqlData.GetQuad(ColumnIndex - 1);
267 with FIBConnection do
268 ReadBlobBufer(GetPlainDriver, GetDBHandle, GetTrHandle,
269 BlobId, Size, Buffer);
273 TempStream := TMemoryStream.Create;
274 Result := TZAbstractBlob.CreateWithStream(TempStream, FIBConnection, GetMetaData.GetColumnType(ColumnIndex) = stUnicodeStream);
277 case GetMetaData.GetColumnType(ColumnIndex) of
279 Result := TZAbstractBlob.CreateWithData(Buffer, Size, FIBConnection);
282 Result := TZAbstractBlob.CreateWithData(Buffer, Size, FIBConnection);
283 TempStream := TStringStream.Create(GetValidatedAnsiString(Result.GetString, Consettings, True));
284 Result.SetStream(TempStream);
288 TempStream := GetValidatedUnicodeStream(Buffer, Size, ConSettings, True);
289 Result := TZAbstractBlob.CreateWithStream(TempStream, FIBConnection, True);
293 if Assigned(TempStream) then FreeAndNil(TempStream);
294 FreeMem(Buffer, Size);
299 BlobId := FSqlData.GetQuad(ColumnIndex - 1);
300 Result := TZInterbase6Blob.Create(FIBConnection, BlobId);
308 Gets the value of the designated column in the current row
309 of this <code>ResultSet</code> object as
310 a <code>boolean</code> in the Java programming language.
312 @param columnIndex the first column is 1, the second is 2, ...
313 @return the column value; if the value is SQL <code>NULL</code>, the
314 value returned is <code>false</code>
316 function TZInterbase6ResultSet.GetBoolean(ColumnIndex: Integer): Boolean;
319 {$IFNDEF DISABLE_CHECKING}
320 CheckColumnConvertion(ColumnIndex, stBoolean);
322 Result := FSqlData.GetBoolean(ColumnIndex - 1);
323 LastWasNull := IsNull(ColumnIndex);
327 Gets the value of the designated column in the current row
328 of this <code>ResultSet</code> object as
329 a <code>byte</code> in the Java programming language.
331 @param columnIndex the first column is 1, the second is 2, ...
332 @return the column value; if the value is SQL <code>NULL</code>, the
333 value returned is <code>0</code>
335 function TZInterbase6ResultSet.GetByte(ColumnIndex: Integer): Byte;
338 {$IFNDEF DISABLE_CHECKING}
339 CheckColumnConvertion(ColumnIndex, stByte);
341 Result := FSqlData.GetByte(ColumnIndex - 1);
342 LastWasNull := IsNull(ColumnIndex);
346 Gets the value of the designated column in the current row
347 of this <code>ResultSet</code> object as
348 a <code>byte</code> array in the Java programming language.
349 The bytes represent the raw values returned by the driver.
351 @param columnIndex the first column is 1, the second is 2, ...
352 @return the column value; if the value is SQL <code>NULL</code>, the
353 value returned is <code>null</code>
355 function TZInterbase6ResultSet.GetBytes(ColumnIndex: Integer): TByteDynArray;
358 {$IFNDEF DISABLE_CHECKING}
359 CheckColumnConvertion(ColumnIndex, stBytes);
361 Result := FSqlData.GetBytes(ColumnIndex - 1);
362 LastWasNull := IsNull(ColumnIndex);
366 Gets the value of the designated column in the current row
367 of this <code>ResultSet</code> object as
368 a <code>java.sql.Date</code> object in the Java programming language.
370 @param columnIndex the first column is 1, the second is 2, ...
371 @return the column value; if the value is SQL <code>NULL</code>, the
372 value returned is <code>null</code>
374 function TZInterbase6ResultSet.GetDate(ColumnIndex: Integer): TDateTime;
377 {$IFNDEF DISABLE_CHECKING}
378 CheckColumnConvertion(ColumnIndex, stDate);
380 Result := FSqlData.GetDate(ColumnIndex - 1);
381 LastWasNull := IsNull(ColumnIndex);
385 Gets the value of the designated column in the current row
386 of this <code>ResultSet</code> object as
387 a <code>double</code> in the Java programming language.
389 @param columnIndex the first column is 1, the second is 2, ...
390 @return the column value; if the value is SQL <code>NULL</code>, the
391 value returned is <code>0</code>
393 function TZInterbase6ResultSet.GetDouble(ColumnIndex: Integer): Double;
396 {$IFNDEF DISABLE_CHECKING}
397 CheckColumnConvertion(ColumnIndex, stDouble);
399 Result := FSqlData.GetDouble(ColumnIndex - 1);
400 LastWasNull := IsNull(ColumnIndex);
404 Gets the value of the designated column in the current row
405 of this <code>ResultSet</code> object as
406 a <code>float</code> in the Java programming language.
408 @param columnIndex the first column is 1, the second is 2, ...
409 @return the column value; if the value is SQL <code>NULL</code>, the
410 value returned is <code>0</code>
412 function TZInterbase6ResultSet.GetFloat(ColumnIndex: Integer): Single;
415 {$IFNDEF DISABLE_CHECKING}
416 CheckColumnConvertion(ColumnIndex, stFloat);
418 Result := FSqlData.GetFloat(ColumnIndex - 1);
419 LastWasNull := IsNull(ColumnIndex);
423 Gets the value of the designated column in the current row
424 of this <code>ResultSet</code> object as
425 an <code>int</code> in the Java programming language.
427 @param columnIndex the first column is 1, the second is 2, ...
428 @return the column value; if the value is SQL <code>NULL</code>, the
429 value returned is <code>0</code>
431 function TZInterbase6ResultSet.GetInt(ColumnIndex: Integer): Integer;
434 {$IFNDEF DISABLE_CHECKING}
435 CheckColumnConvertion(ColumnIndex, stInteger);
437 Result := FSqlData.GetInt(ColumnIndex - 1);
438 LastWasNull := IsNull(ColumnIndex);
442 Gets the value of the designated column in the current row
443 of this <code>ResultSet</code> object as
444 a <code>long</code> in the Java programming language.
446 @param columnIndex the first column is 1, the second is 2, ...
447 @return the column value; if the value is SQL <code>NULL</code>, the
448 value returned is <code>0</code>
450 function TZInterbase6ResultSet.GetLong(ColumnIndex: Integer): Int64;
453 {$IFNDEF DISABLE_CHECKING}
454 CheckColumnConvertion(ColumnIndex, stLong);
456 Result := FSqlData.GetLong(ColumnIndex - 1);
457 LastWasNull := IsNull(ColumnIndex);
461 Gets the value of the designated column in the current row
462 of this <code>ResultSet</code> object as
463 a <code>short</code> in the Java programming language.
465 @param columnIndex the first column is 1, the second is 2, ...
466 @return the column value; if the value is SQL <code>NULL</code>, the
467 value returned is <code>0</code>
469 function TZInterbase6ResultSet.GetShort(ColumnIndex: Integer): SmallInt;
472 {$IFNDEF DISABLE_CHECKING}
473 CheckColumnConvertion(ColumnIndex, stShort);
475 Result := FSqlData.GetShort(ColumnIndex - 1);
476 LastWasNull := IsNull(ColumnIndex);
480 Gets the value of the designated column in the current row
481 of this <code>ResultSet</code> object as
482 a <code>String</code> in the Java programming language.
484 @param columnIndex the first column is 1, the second is 2, ...
485 @return the column value; if the value is SQL <code>NULL</code>, the
486 value returned is <code>null</code>
488 function TZInterbase6ResultSet.InternalGetString(ColumnIndex: Integer): RawByteString;
491 {$IFNDEF DISABLE_CHECKING}
492 CheckColumnConvertion(ColumnIndex, stString);
494 LastWasNull := IsNull(ColumnIndex);
495 Result := FSqlData.GetString(ColumnIndex - 1);
499 Gets the value of the designated column in the current row
500 of this <code>ResultSet</code> object as
501 a <code>java.sql.Time</code> object in the Java programming language.
503 @param columnIndex the first column is 1, the second is 2, ...
504 @return the column value; if the value is SQL <code>NULL</code>, the
505 value returned is <code>null</code>
507 function TZInterbase6ResultSet.GetTime(ColumnIndex: Integer): TDateTime;
510 {$IFNDEF DISABLE_CHECKING}
511 CheckColumnConvertion(ColumnIndex, stTime);
513 Result := FSqlData.GetTime(ColumnIndex - 1);
514 LastWasNull := IsNull(ColumnIndex);
518 Gets the value of the designated column in the current row
519 of this <code>ResultSet</code> object as
520 a <code>java.sql.Timestamp</code> object in the Java programming language.
522 @param columnIndex the first column is 1, the second is 2, ...
523 @return the column value; if the value is SQL <code>NULL</code>, the
524 value returned is <code>null</code>
525 @exception SQLException if a database access error occurs
527 function TZInterbase6ResultSet.GetTimestamp(ColumnIndex: Integer): TDateTime;
530 {$IFNDEF DISABLE_CHECKING}
531 CheckColumnConvertion(ColumnIndex, stTimestamp);
533 Result := FSqlData.GetTimestamp(ColumnIndex - 1);
534 LastWasNull := IsNull(ColumnIndex);
538 Indicates if the value of the designated column in the current row
539 of this <code>ResultSet</code> object is Null.
541 @param columnIndex the first column is 1, the second is 2, ...
542 @return if the value is SQL <code>NULL</code>, the
543 value returned is <code>true</code>. <code>false</code> otherwise.
545 function TZInterbase6ResultSet.IsNull(ColumnIndex: Integer): Boolean;
548 Result := FSqlData.IsNull(ColumnIndex - 1);
552 Gets the value of the designated column in the current row
553 of this <code>ResultSet</code> object as
554 a <code>String</code> in the Java programming language.
556 @param columnIndex the first column is 1, the second is 2, ...
557 @return the column value; if the value is SQL <code>NULL</code>, the
558 value returned is <code>null</code>
560 function TZInterbase6ResultSet.GetString(ColumnIndex: Integer): String;
563 {$IFNDEF DISABLE_CHECKING}
564 CheckColumnConvertion(ColumnIndex, stString);
566 LastWasNull := IsNull(ColumnIndex);
567 if ( ConSettings.ClientCodePage.ID = CS_NONE ) then //CharacterSet 'NONE' doesn't convert anything! Data as is!
568 case FSqlData.GetIbSqlType(ColumnIndex -1) of
569 SQL_VARYING, SQL_TEXT:
570 if FSqlData.GetIbSqlSubType(ColumnIndex -1) = CS_NONE then
571 Result := ZDbcString(FSqlData.GetString(ColumnIndex - 1))
573 Result := ZDbcString(FSqlData.GetString(ColumnIndex - 1),
574 FIBConnection.GetPlainDriver.ValidateCharEncoding(FSqlData.GetIbSqlSubType(ColumnIndex -1)).CP);
576 Result := ZDbcString(FSqlData.GetString(ColumnIndex - 1));
579 Result := ZDbcString(FSqlData.GetString(ColumnIndex - 1));
583 Gets the value of the designated column in the current row
584 of this <code>ResultSet</code> object as
585 a <code>WideString</code> in the Delphi programming language.
587 @param columnIndex the first column is 1, the second is 2, ...
588 @return the column value; if the value is SQL <code>NULL</code>, the
589 value returned is <code>null</code>
591 function TZInterbase6ResultSet.GetUnicodeString(ColumnIndex: Integer): WideString;
594 {$IFNDEF DISABLE_CHECKING}
595 CheckColumnConvertion(ColumnIndex, stString);
597 LastWasNull := IsNull(ColumnIndex);
598 if ( ConSettings.ClientCodePage.ID = CS_NONE ) then //CharacterSet 'NONE' doesn't convert anything! Data as is!
599 case FSqlData.GetIbSqlType(ColumnIndex -1) of
600 SQL_VARYING, SQL_TEXT:
601 if FSqlData.GetIbSqlSubType(ColumnIndex -1) = CS_NONE then
602 Result := ZDbcUnicodeString(FSqlData.GetString(ColumnIndex - 1))
604 Result := ZDbcUnicodeString(FSqlData.GetString(ColumnIndex - 1),
605 FIBConnection.GetPlainDriver.ValidateCharEncoding(FSqlData.GetIbSqlSubType(ColumnIndex -1)).CP);
607 Result := ZDbcUnicodeString(FSqlData.GetString(ColumnIndex - 1));
610 Result := ZDbcUnicodeString(FSqlData.GetString(ColumnIndex - 1));
614 Moves the cursor to the given row number in
615 this <code>ResultSet</code> object.
617 <p>If the row number is positive, the cursor moves to
618 the given row number with respect to the
619 beginning of the result set. The first row is row 1, the second
622 <p>If the given row number is negative, the cursor moves to
623 an absolute row position with respect to
624 the end of the result set. For example, calling the method
625 <code>absolute(-1)</code> positions the
626 cursor on the last row; calling the method <code>absolute(-2)</code>
627 moves the cursor to the next-to-last row, and so on.
629 <p>An attempt to position the cursor beyond the first/last row in
630 the result set leaves the cursor before the first row or after
633 <p><B>Note:</B> Calling <code>absolute(1)</code> is the same
634 as calling <code>first()</code>. Calling <code>absolute(-1)</code>
635 is the same as calling <code>last()</code>.
637 @return <code>true</code> if the cursor is on the result set;
638 <code>false</code> otherwise
640 function TZInterbase6ResultSet.MoveAbsolute(Row: Integer): Boolean;
643 RaiseForwardOnlyException;
647 Moves the cursor down one row from its current position.
648 A <code>ResultSet</code> cursor is initially positioned
649 before the first row; the first call to the method
650 <code>next</code> makes the first row the current row; the
651 second call makes the second row the current row, and so on.
653 <P>If an input stream is open for the current row, a call
654 to the method <code>next</code> will
655 implicitly close it. A <code>ResultSet</code> object's
656 warning chain is cleared when a new row is read.
658 @return <code>true</code> if the new current row is valid;
659 <code>false</code> if there are no more rows
661 function TZInterbase6ResultSet.Next: Boolean;
663 StatusVector: TARRAY_ISC_STATUS;
665 { Checks for maximum row. }
667 if (MaxRows > 0) and (LastRowNo >= MaxRows) then
671 if (ResultSetType = rtForwardOnly) and (FFetchStat = 0) then
673 with FIBConnection do
675 if (FCursorName = '') then //AVZ - Test for ExecProc - this is for multiple rows
677 FFetchStat := GetPlainDriver.isc_dsql_fetch(@StatusVector,
678 @FStmtHandle, GetDialect, FSqlData.GetData);
687 if FFetchStat = 0 then
695 CheckInterbase6Error(FIBConnection.GetPlainDriver, StatusVector, lcOther);
700 Opens this recordset.
702 procedure TZInterbase6ResultSet.Open;
705 FieldSqlType: TZSQLType;
706 ColumnInfo: TZColumnInfo;
707 ZCodePageInfo: PZCodePage;
709 if FStmtHandle=0 then
710 raise EZSQLException.Create(SCanNotRetrieveResultSetData);
713 for I := 0 to FSqlData.GetFieldCount - 1 do
715 ColumnInfo := TZColumnInfo.Create;
716 with ColumnInfo, FSqlData do
718 ColumnName := GetFieldSqlName(I);
719 TableName := GetFieldRelationName(I);
720 ColumnLabel := GetFieldAliasName(I);
721 FieldSqlType := GetFieldSqlType(I);
722 ColumnType := FieldSqlType;
724 if FieldSqlType in [stString, stUnicodeString] then
726 ZCodePageInfo := FIBConnection.GetPlainDriver.ValidateCharEncoding(GetIbSqlSubType(I)); //get column CodePage info
727 Precision := GetFieldSize(ColumnType, ConSettings, GetIbSqlLen(I),
728 ZCodePageInfo^.CharWidth, @ColumnDisplaySize, True);
730 if FieldSQLType = stBytes then
731 Precision := GetIbSqlLen(I);
733 ReadOnly := (TableName = '') or (ColumnName = '') or
734 (ColumnName = 'RDB$DB_KEY') or (FieldSqlType = ZDbcIntfs.stUnknown);
736 if IsNullable(I) then
737 Nullable := ntNullable
739 Nullable := ntNoNulls;
741 Scale := GetFieldScale(I);
742 CaseSensitive := UpperCase(ColumnName) <> ColumnName; //non quoted fields are uppercased by default
744 ColumnsInfo.Add(ColumnInfo);
749 function TZInterbase6ResultSet.GetCursorName: AnsiString;
751 Result := FCursorName;
756 function TZInterbase6Blob.Clone: IZBlob;
758 Result := TZInterbase6Blob.Create(FIBConnection, FBlobId);
762 Reads the blob information by blob handle.
763 @param handle a Interbase6 database connect handle.
764 @param the statement previously prepared
766 constructor TZInterbase6Blob.Create(IBConnection: IZInterbase6Connection;
767 var BlobId: TISC_QUAD);
771 FIBConnection := IBConnection;
774 function TZInterbase6Blob.GetBytes: TByteDynArray;
777 Result := inherited GetBytes;
780 function TZInterbase6Blob.GetStream: TStream;
783 Result := inherited GetStream;
786 function TZInterbase6Blob.GetString: RawByteString;
789 Result := inherited GetString;
792 function TZInterbase6Blob.GetUnicodeString: WideString;
795 Result := inherited GetUnicodeString;
798 function TZInterbase6Blob.IsEmpty: Boolean;
801 Result := inherited IsEmpty;
807 procedure TZInterbase6Blob.ReadBlob;
815 with FIBConnection do
816 ReadBlobBufer(GetPlainDriver, GetDBHandle, GetTrHandle, FBlobId, Size, Buffer);