--- ibx/trunk/runtime/IBUtils.pas 2000/07/31 16:43:00 4 +++ ibx/trunk/runtime/IBUtils.pas 2011/02/18 16:26:16 5 @@ -28,10 +28,17 @@ unit IBUtils; +{$Mode Delphi} + interface uses - Windows, Classes, SysUtils; +{$IFDEF LINUX } + unix, +{$ELSE} + Windows, +{$ENDIF} + Classes, SysUtils; const CRLF = #13 + #10; @@ -48,6 +55,7 @@ function StripString(st: String; CharsTo function FormatIdentifier(Dialect: Integer; Value: String): String; function FormatIdentifierValue(Dialect: Integer; Value: String): String; function ExtractIdentifier(Dialect: Integer; Value: String): String; +function QuoteIdentifier(Dialect: Integer; Value: String): String; implementation @@ -143,4 +151,13 @@ begin Result := Value; end; +function QuoteIdentifier(Dialect: Integer; Value: String): String; +begin + if Dialect = 1 then + Value := AnsiUpperCase(Trim(Value)) + else + Value := '"' + Value + '"'; + Result := Value; +end; + end.