"Invalid argument to date encode." error

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
wingtang
Posts: 12
Joined: Wed 19 Aug 2009 01:21

"Invalid argument to date encode." error

Post by wingtang » Wed 19 Aug 2009 02:09

We used ODAC 6.25 components
and linked them by following
TOraSession -> TOraQuery -> TOraProvider ->TClientDataSet->TDataSource -> TDBGrid
And we wrote a SQL that just selected one timestamp type field in the ClientDataSet,
after we opened the ClientDataSet, we got no record but a error message said "Invalid argument to date encode." Could you tell me what should we do to solve this problem?

Environment Setting:
Oracle 10g, Delphi 7 (with 7.1 Update), Oracle 10g client, Windows 2003 Server Standard Edition

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 19 Aug 2009 08:00

TOraProvider or TDataSetProvider does not support TOraTimeStampField fields that are created for TIMESTAMP data type.

wingtang
Posts: 12
Joined: Wed 19 Aug 2009 01:21

Post by wingtang » Wed 19 Aug 2009 09:27

Plash wrote:TOraProvider or TDataSetProvider does not support TOraTimeStampField fields that are created for TIMESTAMP data type.
Thanks for replying, will the field type be support in the future version? :?:

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 20 Aug 2009 08:16

In the next ODAC build we'll add the EnableOraTimeStamp option to TOraSession. You need to set this option to False. In this case standard field type will be used instead of TOraTimeStampField, and your query will work with TDataSetProvider.

Iliev
Posts: 7
Joined: Fri 18 Dec 2009 12:06

Post by Iliev » Thu 26 Apr 2012 14:37

I have the same problem with ODAC 8.15 and Delphi XE. It doesn't matter if I set EnableOraTimestamp property in TOraSession to true or false. First - TOraQuery always creates TOraTimeStampField and second - event when I manually replaced "TOraTimeStampField, {ftOraTimeStamp}" row with "TSQLTimeStampField, {ftOraTimeStamp}" in ODACFieldClasses array this error continued to happen.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 27 Apr 2012 09:36

Hello,

Thank you for the information.
We have reproduced the problem.
We will try to fix it in the nearest product version.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: "Invalid argument to date encode." error

Post by AlexP » Fri 22 Jun 2012 14:59

hello,

The new ODAC version 8.2.7 including this fix is already available at our site

Post Reply