Interbase incorrect fieldsize for system tables

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
evdkraan
Posts: 11
Joined: Wed 20 Jan 2010 23:07

Interbase incorrect fieldsize for system tables

Post by evdkraan » Mon 03 Jun 2013 08:43

IBDac version 4.6.12 with InterBase 2007.

When querying a InterBase database created with charset UTF8 the automaticly and/or persitent fields are generated with the incorrect field size for system tables.

The problem is in the IBCClasses unit in the function TGDSConnection.GetCharLength:

Code: Select all

  case CharsetID and $ff of
    5, 6, 8, 44, 56, 57, 64:
      Result := 2;
    3:
      if (Pos('RDB$', RelName) = 1) and ((GetMajorServerVersion >= 9) or GetMajorServerVersion < 2)) then
        Result := 1
      else
        Result := 3;
    4, 59:
      Result := 4;
  else
    Result := 1;
  end;
Because the major version for Interbase 2007 is 8 the lenght 3 is returned and therefor the fieldsize of the result fields are divided by 3.

If I change the if statement to:

Code: Select all

if (Pos('RDB$', RelName) = 1) and ((GetMajorServerVersion >= 8) or GetMajorServerVersion < 2)) then
the fieldsize of the result fields are correct.

Could you please verify if my corrections are correct ?

AndreyZ

Re: Interbase incorrect fieldsize for system tables

Post by AndreyZ » Mon 03 Jun 2013 13:05

Thank you for the information. We have fixed this problem. This fix will be included in the next IBDAC build. Your modification is correct.

evdkraan
Posts: 11
Joined: Wed 20 Jan 2010 23:07

Re: Interbase incorrect fieldsize for system tables

Post by evdkraan » Tue 04 Jun 2013 10:52

Thanks for the quick reply and the info that my modification is correct, so we can continue with our project while waiting for the next release.

AndreyZ

Re: Interbase incorrect fieldsize for system tables

Post by AndreyZ » Tue 04 Jun 2013 11:06

Feel free to contact us if you have any further questions about IBDAC.

Post Reply