Spring.Persistence.SQL.Generators.Firebird: GetSQLDataTypeName fails with String

Issue #191 resolved
Former user created an issue

A mistake in the function GetSQLDataTypeName in the Unit Spring.Persistence.SQL.Generators.Firebird.pas in line 129 / 131:

The function "StartsText" is called with the wrong parameter order. (http://docwiki.embarcadero.com/Libraries/Seattle/en/System.StrUtils.StartsText) So the "Create Table"-SQL in Firebird fails.

The right call should be:

function TFirebirdSQLGenerator.GetSQLDataTypeName(
  const field: TSQLCreateField): string;
begin
  Result := inherited GetSQLDataTypeName(field);
  if StartsText('NCHAR', Result) then
    Result := Copy(Result, 2, Length(Result)) + ' CHARACTER SET UNICODE_FSS'
  else if StartsText('NVARCHAR', Result) then
    Result := Copy(Result, 2, Length(Result)) + ' CHARACTER SET UNICODE_FSS';
end;

A diff-file is in the attachement.

Comments (3)

  1. Log in to comment