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

Comparing ibx/trunk/fbintf/client/FBAttachment.pas (file contents):
Revision 60 by tony, Mon Mar 27 15:21:02 2017 UTC vs.
Revision 109 by tony, Thu Jan 18 14:37:48 2018 UTC

# Line 114 | Line 114 | type
114      property DPB: IDPB read FDPB;
115   public
116      {Character Sets}
117 +  function HasDefaultCharSet: boolean;
118 +  function GetDefaultCharSetID: integer;
119    function GetCharsetName(CharSetID: integer): AnsiString;
120    function CharSetID2CodePage(CharSetID: integer; var CodePage: TSystemCodePage): boolean;
121    function CodePage2CharSetID(CodePage: TSystemCodePage; var CharSetID: integer): boolean;
# Line 121 | Line 123 | public
123    function CharSetWidth(CharSetID: integer; var Width: integer): boolean;
124    procedure RegisterCharSet(CharSetName: AnsiString; CodePage: TSystemCodePage;
125      AllowReverseLookup:boolean; out CharSetID: integer);
124  property HasDefaultCharSet: boolean read FHasDefaultCharSet;
126    property CharSetID: integer read FCharSetID;
127    property CodePage: TSystemCodePage read FCodePage;
128    end;
# Line 277 | Line 278 | begin
278      case params[i].vtype of
279        vtinteger    :
280          SQLParams[i].AsInteger := params[i].vinteger;
281 +      vtInt64:
282 +        SQLParams[i].AsInt64 := params[i].VInt64^;
283 +      {$IF declared (vtQWord)}
284 +      vtQWord:
285 +        SQLParams[i].AsInt64 := params[i].VQWord^;
286 +      {$IFEND}
287        vtboolean    :
288          SQLParams[i].AsBoolean :=  params[i].vboolean;
289        vtchar       :
# Line 286 | Line 293 | begin
293        vtCurrency:
294          SQLParams[i].AsDouble := params[i].VCurrency^;
295        vtString     :
296 <        SQLParams[i].AsString := params[i].VString^;
296 >        SQLParams[i].AsString := strpas(PChar(params[i].VString));
297        vtPChar      :
298          SQLParams[i].AsString := strpas(params[i].VPChar);
299        vtAnsiString :
300 <        SQLParams[i].AsString := AnsiString(params[i].VAnsiString^);
300 >        SQLParams[i].AsString := strpas(PAnsiChar(params[i].VAnsiString));
301        vtVariant:
302          SQLParams[i].AsVariant := params[i].VVariant^;
303 +      vtWideChar:
304 +        SQLParams[i].AsString := UTF8Encode(WideCharLenToString(@params[i].VWideChar,1));
305 +      vtPWideChar:
306 +        SQLParams[i].AsString := UTF8Encode(strpas(PWideChar(params[i].VPWideChar)));
307 +      vtWideString:
308 +        SQLParams[i].AsString := UTF8Encode(strpas(PWideChar(params[i].VWideString)));
309 +      vtUnicodeString:
310 +        SQLParams[i].AsString := UTF8Encode(strpas(PWideChar(params[i].VUnicodeString)));
311      else
312          IBError(ibxeInvalidVariantType,[nil]);
313      end;
# Line 463 | Line 478 | begin
478    Result := OpenBlob(Transaction,Field.GetBlobMetadata, Field.AsQuad,BPB);
479   end;
480  
481 + function TFBAttachment.HasDefaultCharSet: boolean;
482 + begin
483 +  Result := FHasDefaultCharSet
484 + end;
485 +
486 + function TFBAttachment.GetDefaultCharSetID: integer;
487 + begin
488 +  Result := FCharsetID;
489 + end;
490 +
491   function TFBAttachment.GetCharsetName(CharSetID: integer): AnsiString;
492   var i: integer;
493   begin

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines