Page 1 of 1

Interbase incorrect fieldsize for system tables

Posted: Mon 03 Jun 2013 08:43
by evdkraan
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 ?

Re: Interbase incorrect fieldsize for system tables

Posted: Mon 03 Jun 2013 13:05
by AndreyZ
Thank you for the information. We have fixed this problem. This fix will be included in the next IBDAC build. Your modification is correct.

Re: Interbase incorrect fieldsize for system tables

Posted: Tue 04 Jun 2013 10:52
by evdkraan
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.

Re: Interbase incorrect fieldsize for system tables

Posted: Tue 04 Jun 2013 11:06
by AndreyZ
Feel free to contact us if you have any further questions about IBDAC.