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 348 by tony, Mon Sep 20 22:08:20 2021 UTC vs.
Revision 349 by tony, Mon Oct 18 08:39:40 2021 UTC

# Line 137 | Line 137 | type
137    public
138      constructor Create(aParent: TIBXSQLDA; aIndex: integer);
139      procedure Changed; override;
140 +    procedure InitColumnMetaData(aMetaData: Firebird.IMessageMetadata);
141      procedure ColumnSQLDataInit;
142      procedure RowChange; override;
143      procedure FreeSQLData;
# Line 450 | Line 451 | begin
451    TIBXSQLDA(Parent).Changed;
452   end;
453  
454 + procedure TIBXSQLVAR.InitColumnMetaData(aMetaData: Firebird.IMessageMetadata);
455 + begin
456 +  with FFirebird30ClientAPI do
457 +  begin
458 +    FSQLType := aMetaData.getType(StatusIntf,Index);
459 +    Check4DataBaseError;
460 +    if FSQLType = SQL_BLOB then
461 +    begin
462 +      FSQLSubType := aMetaData.getSubType(StatusIntf,Index);
463 +      Check4DataBaseError;
464 +    end
465 +    else
466 +      FSQLSubType := 0;
467 +    FDataLength := aMetaData.getLength(StatusIntf,Index);
468 +    Check4DataBaseError;
469 +    FMetadataSize := FDataLength;
470 +    FRelationName := strpas(aMetaData.getRelation(StatusIntf,Index));
471 +    Check4DataBaseError;
472 +    FFieldName := strpas(aMetaData.getField(StatusIntf,Index));
473 +    Check4DataBaseError;
474 +    FNullable := aMetaData.isNullable(StatusIntf,Index);
475 +    Check4DataBaseError;
476 +    FScale := aMetaData.getScale(StatusIntf,Index);
477 +    Check4DataBaseError;
478 +    FCharSetID :=  aMetaData.getCharSet(StatusIntf,Index) and $FF;
479 +    Check4DataBaseError;
480 +  end;
481 + end;
482 +
483   procedure TIBXSQLVAR.ColumnSQLDataInit;
484   begin
485    FreeSQLData;
# Line 983 | Line 1013 | begin
1013      for i := 0 to Count - 1 do
1014      with TIBXSQLVar(Column[i]) do
1015      begin
1016 <      FSQLType := aMetaData.getType(StatusIntf,i);
1017 <      Check4DataBaseError;
988 <      if FSQLType = SQL_BLOB then
989 <      begin
990 <        FSQLSubType := aMetaData.getSubType(StatusIntf,i);
991 <        Check4DataBaseError;
992 <      end
993 <      else
994 <        FSQLSubType := 0;
995 <      FDataLength := aMetaData.getLength(StatusIntf,i);
996 <      Check4DataBaseError;
997 <      FMetadataSize := FDataLength;
998 <      FNullable := aMetaData.isNullable(StatusIntf,i);
999 <      Check4DataBaseError;
1016 >      InitColumnMetaData(aMetaData);
1017 >      SaveMetaData;
1018        if FNullable then
1019          FSQLNullIndicator := @FNullIndicator
1020        else
1021          FSQLNullIndicator := nil;
1004      FScale := aMetaData.getScale(StatusIntf,i);
1005      Check4DataBaseError;
1006      FCharSetID :=  aMetaData.getCharSet(StatusIntf,i) and $FF;
1007      Check4DataBaseError;
1022        ColumnSQLDataInit;
1023      end;
1024    end;
# Line 1057 | Line 1071 | begin
1071      for i := 0 to Count - 1 do
1072      with TIBXSQLVar(Column[i]) do
1073      begin
1074 <      FSQLType := aMetaData.getType(StatusIntf,i);
1061 <      Check4DataBaseError;
1062 <      if FSQLType = SQL_BLOB then
1063 <      begin
1064 <        FSQLSubType := aMetaData.getSubType(StatusIntf,i);
1065 <        Check4DataBaseError;
1066 <      end
1067 <      else
1068 <        FSQLSubType := 0;
1069 <      FBlob := nil;
1070 <      FArray := nil;
1074 >      InitColumnMetaData(aMetaData);
1075        FSQLData := FMessageBuffer + metaData.getOffset(StatusIntf,i);
1076        Check4DataBaseError;
1073      FDataLength := aMetaData.getLength(StatusIntf,i);
1074      Check4DataBaseError;
1075      FMetadataSize := FDataLength;
1076      FRelationName := strpas(aMetaData.getRelation(StatusIntf,i));
1077      Check4DataBaseError;
1078      FFieldName := strpas(aMetaData.getField(StatusIntf,i));
1079      Check4DataBaseError;
1080      FNullable := aMetaData.isNullable(StatusIntf,i);
1081      Check4DataBaseError;
1077        if FNullable then
1078        begin
1079          FSQLNullIndicator := PShort(FMessageBuffer + aMetaData.getNullOffset(StatusIntf,i));
# Line 1086 | Line 1081 | begin
1081        end
1082        else
1083          FSQLNullIndicator := nil;
1084 <      FScale := aMetaData.getScale(StatusIntf,i);
1085 <      Check4DataBaseError;
1091 <      FCharSetID :=  aMetaData.getCharSet(StatusIntf,i) and $FF;
1092 <      Check4DataBaseError;
1084 >      FBlob := nil;
1085 >      FArray := nil;
1086      end;
1087    end;
1088    SetUniqueRelationName;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines