TODBCConnection creates string fields with Size +1
Original Reporter info from Mantis: lacak @lacak.sk
-
Reporter name: LacaK
Original Reporter info from Mantis: lacak @lacak.sk
- Reporter name: LacaK
Description:
If I have for example varchar(10) column it is created in Fileds collection like TStringField with size 11, which is IMHO not correct.
There is in odbcconn.pas:
case DataType of
SQL_CHAR: begin FieldType:=ftFixedChar; FieldSize:=ColumnSize+1; end;
SQL_VARCHAR: begin FieldType:=ftString; FieldSize:=ColumnSize+1; end;
...etc
IMHO correct is:
case DataType of
SQL_CHAR: begin FieldType:=ftFixedChar; FieldSize:=ColumnSize; end;
SQL_VARCHAR: begin FieldType:=ftString; FieldSize:=ColumnSize; end;
...etc.
There are also some other places, where it must be fixed/adjusted ;-)
Mantis conversion info:
- Mantis ID: 17268
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 16988 (#83b09406)