ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/udr/client/3.0/FB30Statement.pas
(Generate patch)

Comparing ibx/trunk/fbintf/client/3.0/FB30Statement.pas (file contents):
Revision 270 by tony, Fri Jan 18 11:10:37 2019 UTC vs.
Revision 338 by tony, Wed Jun 9 12:07:56 2021 UTC

# Line 101 | Line 101 | type
101      FSQLData: PByte; {Address of SQL Data in Message Buffer}
102      FSQLNullIndicator: PShort; {Address of null indicator}
103      FDataLength: integer;
104 +    FMetadataSize: integer;
105      FNullable: boolean;
106      FScale: integer;
107      FCharSetID: cardinal;
# Line 117 | Line 118 | type
118       function GetScale: integer; override;
119       function GetCharSetID: cardinal; override;
120       function GetCodePage: TSystemCodePage; override;
121 +     function GetCharSetWidth: integer; override;
122       function GetIsNull: Boolean;   override;
123       function GetIsNullable: boolean; override;
124       function GetSQLData: PByte;  override;
125       function GetDataLength: cardinal; override;
126 +     function GetSize: cardinal; override;
127       procedure SetIsNull(Value: Boolean); override;
128       procedure SetIsNullable(Value: Boolean);  override;
129       procedure SetSQLData(AValue: PByte; len: cardinal); override;
# Line 359 | Line 362 | begin
362       CharSetID2CodePage(GetCharSetID,result);
363   end;
364  
365 + function TIBXSQLVAR.GetCharSetWidth: integer;
366 + begin
367 +  result := 1;
368 +  with Statement.GetAttachment DO
369 +    CharSetWidth(GetCharSetID,result);
370 + end;
371 +
372   function TIBXSQLVAR.GetIsNull: Boolean;
373   begin
374    Result := IsNullable and (FSQLNullIndicator^ = -1);
# Line 379 | Line 389 | begin
389    Result := FDataLength;
390   end;
391  
392 + function TIBXSQLVAR.GetSize: cardinal;
393 + begin
394 +  Result := FMetadataSize;
395 + end;
396 +
397   function TIBXSQLVAR.GetArrayMetaData: IArrayMetaData;
398   begin
399    if GetSQLType <> SQL_ARRAY then
# Line 720 | Line 735 | begin
735    FMetaData := aMetaData;
736    with FFirebird30ClientAPI do
737    begin
738 <    Count := metadata.getCount(StatusIntf);
738 >    Count := aMetadata.getCount(StatusIntf);
739      Check4DataBaseError;
740      Initialize;
741  
# Line 737 | Line 752 | begin
752        else
753          FSQLSubType := 0;
754        FDataLength := aMetaData.getLength(StatusIntf,i);
755 +      FMetadataSize := FDataLength;
756        Check4DataBaseError;
757        case SQLType of
758          SQL_TEXT, SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_TIMESTAMP,
759          SQL_BLOB, SQL_ARRAY, SQL_QUAD, SQL_SHORT, SQL_BOOLEAN,
760 <        SQL_LONG, SQL_INT64, SQL_DOUBLE, SQL_FLOAT, SQL_D_FLOAT:
760 >        SQL_LONG, SQL_INT64, SQL_INT128, SQL_DOUBLE, SQL_FLOAT, SQL_D_FLOAT,
761 >        SQL_TIMESTAMP_TZ, SQL_TIME_TZ, SQL_DEC_FIXED, SQL_DEC16, SQL_DEC34,
762 >        SQL_TIMESTAMP_TZ_EX, SQL_TIME_TZ_EX:
763          begin
764            if (FDataLength = 0) then
765              { Make sure you get a valid pointer anyway
# Line 824 | Line 842 | begin
842        Check4DataBaseError;
843        FDataLength := aMetaData.getLength(StatusIntf,i);
844        Check4DataBaseError;
845 +      FMetadataSize := FDataLength;
846        FRelationName := strpas(aMetaData.getRelation(StatusIntf,i));
847        Check4DataBaseError;
848        FFieldName := strpas(aMetaData.getField(StatusIntf,i));
# Line 1062 | Line 1081 | begin
1081        if (FStatementIntf <> nil) then
1082          FreeHandle;
1083        if E is EIBInterBaseError then
1084 <        raise EIBInterBaseError.Create(EIBInterBaseError(E).SQLCode,
1085 <                                       EIBInterBaseError(E).IBErrorCode,
1067 <                                       EIBInterBaseError(E).Message +
1068 <                                       sSQLErrorSeparator + FSQL)
1069 <      else
1070 <        raise;
1084 >        E.Message := E.Message + sSQLErrorSeparator + FSQL;
1085 >      raise;
1086      end;
1087    end;
1088    FPrepared := true;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines