Page 1 of 1

Problem with TOraSession.Options.ConvertEOL

Posted: Wed 21 Jul 2010 15:44
by rdeutsch
Hi

Working with Delphi 2010

When setting TOraSession.Options.ConvertEOL = true the length of a datafield will be calculated wrong.
For example: a datafield (string type) has a length of 100 characters, but with the function FieldByName(DataField).Size i get a size/length of 150!

The real fieldlength is always multiplied with the factor 1.5. :shock:

Other fields have a real database defined length of 500 chars, but the result of "FieldByName(DataField).Size" gives 750 chars. :roll:

Please can you check this.

When setting TOraSession.Options.ConvertEOL = false all works fine.

Regards
Robert

Posted: Fri 23 Jul 2010 11:14
by bork
Hello

It is a feature of ConvertEOL mode. The problem is that the string size may grow on converting, but TStringField can store strings with length less or equal to the field size. So fields size is increased one and a half times as much to store strings after converting to TStringField.

Posted: Tue 27 Jul 2010 10:23
by rdeutsch
Hi bork

Ok - but is there a way to get the truth lenght? I mean the original database defined length of the string field? Like AsBytes or so?

Regards Robert

Posted: Tue 27 Jul 2010 15:44
by bork
Hi

Now you cannot get the real size of TStringField if the ConvertEOL option is set to True. We will investigate the possibility of adding this feature in one of the next builds/versions of ODAC.