Problem with TOraSession.Options.ConvertEOL

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rdeutsch
Posts: 13
Joined: Mon 16 Apr 2007 09:29

Problem with TOraSession.Options.ConvertEOL

Post by rdeutsch » Wed 21 Jul 2010 15:44

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

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Fri 23 Jul 2010 11:14

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.

rdeutsch
Posts: 13
Joined: Mon 16 Apr 2007 09:29

Post by rdeutsch » Tue 27 Jul 2010 10:23

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

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 27 Jul 2010 15:44

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.

Post Reply