ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/client/2.5/FB25Array.pas
(Generate patch)

Comparing ibx/trunk/fbintf/client/2.5/FB25Array.pas (file contents):
Revision 46 by tony, Tue Dec 6 10:33:46 2016 UTC vs.
Revision 47 by tony, Mon Jan 9 15:31:51 2017 UTC

# Line 44 | Line 44 | type
44  
45    TFB25ArrayMetaData = class(TFBArrayMetaData,IArrayMetaData)
46    private
47    FCharSetID: integer;
47      FCodePage: TSystemCodePage;
48    protected
49      procedure LoadMetaData(aAttachment: IAttachment; aTransaction: ITransaction;
# Line 70 | Line 69 | type
69  
70   implementation
71  
72 < uses FB25ClientAPI;
72 > uses FBAttachment, FB25ClientAPI;
73  
74   const
75    sGetArrayMetaData = 'Select F.RDB$CHARACTER_SET_ID '+
# Line 86 | Line 85 | var
85    DBHandle: TISC_DB_HANDLE;
86    TRHandle: TISC_TR_HANDLE;
87    stmt: IStatement;
88 +  CharWidth: integer;
89   begin
90    DBHandle := (aAttachment as TFB25Attachment).Handle;
91    TRHandle := (aTransaction as TFB25Transaction).Handle;
# Line 120 | Line 120 | begin
120        end;
121      end;
122    end;
123 +  if (FArrayDesc.array_desc_dtype in [blr_text,blr_cstring, blr_varying]) and
124 +      (FCharSetID = 0) then {This really shouldn't be necessary - but it is :(}
125 +  with aAttachment as TFBAttachment do
126 +  begin
127 +    if HasDefaultCharSet  and FirebirdClientAPI.CharSetWidth(CharSetID,CharWidth) then
128 +      FArrayDesc.array_desc_length *= CharWidth;
129 +  end;
130   end;
131  
132   function TFB25ArrayMetaData.GetCharSetID: cardinal;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines