Bug in Ro 9.3..1337

I just upgraded to RO for delphi 9.3…1337 and now in the schema editor when you refresh the fields against an oracle datbaase it multiplies the field size by 4. so if you field size in the databse is 12 then it will default the field size to 48.

Could you specify the following:

  • Database access driver used
  • Oracle version
  • Field type in the database

Thanks in advance

The Access driver is Devart’s Unidac
Oracle version is 11.2
Field type is varchar2

pls execute this SQL:

SELECT 
  C.COLUMN_NAME, C.DATA_TYPE, C.DATA_LENGTH, C.DATA_PRECISION, 
  C.DATA_SCALE, C.NULLABLE, C.DATA_LENGTH, CC.COMMENTS 
FROM 
  USER_TAB_COLUMNS C 
  LEFT OUTER JOIN USER_COL_COMMENTS CC on 
      (CC.TABLE_NAME = C.TABLE_NAME AND CC.COLUMN_NAME = C.COLUMN_NAME) 
WHERE 
   (C.TABLE_NAME='your_tablename')
ORDER BY 
  C.COLUMN_ID

what size for for varchar2 fields will be returned?

When executing this inside the schema editor the query says that the length should be 40 but the fields get created with 120.

weird, if C.DATA_LENGTH in this query is equal 40 then field size also will be 40:

from uDAOracleInterfaces.pas:

procedure Oracle_DoGetTableFields(const aTableName: string; Query: IDAServerDataset; out Fields: TDAFieldCollection);
..
      if ldt in [datString, datWideString, datFixedChar, datFixedWideChar] then begin
        if (Query.Fields[1].AsString = 'ROWID') or (Query.Fields[1].AsString = 'UROWID') then
          fld.Size := 18
        else
          fld.Size := Query.Fields[6].AsInteger;  //<<<<<<<<
      end;

This bug as introduced somewhere in 9.3. You might speak with Antonk about it. He fixed the bug in the .net side of things already.

Could you remind this bug’s ID or at least point me to the topic where it was mentioned?

I tried it on another computer and everything worked as expected so now I don’t think the issue is on your side.