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

Comparing ibx/trunk/fbintf/IBUtils.pas (file contents):
Revision 310 by tony, Thu Apr 11 08:51:23 2019 UTC vs.
Revision 311 by tony, Mon Aug 24 09:32:58 2020 UTC

# Line 737 | Line 737 | end;
737  
738   function QuoteIdentifier(Dialect: Integer; Value: AnsiString): AnsiString;
739   begin
740 +  Value := TrimRight(Value);
741    if Dialect = 1 then
742 <    Value := AnsiUpperCase(Trim(Value))
742 >    Value := AnsiUpperCase(Value)
743    else
744      Value := '"' + StringReplace (Value, '""', '"', [rfReplaceAll]) + '"';
745    Result := Value;
# Line 969 | Line 970 | end;
970  
971   function QuoteIdentifierIfNeeded(Dialect: Integer; Value: AnsiString): AnsiString;
972   begin
973 +  Value := TrimRight(Value);
974    if (Dialect = 3) and
975      (IsReservedWord(Value) or not IsSQLIdentifier(Value) or (AnsiUpperCase(Value) <> Value)) then
976       Result := '"' + StringReplace (TrimRight(Value), '"', '""', [rfReplaceAll]) + '"'

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines