OraQuery.ParamByName('MY_INT').AsInteger := 0 NOK

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
michellenweiter
Posts: 29
Joined: Thu 09 Jun 2005 06:23
Location: Bern, Switzerland

OraQuery.ParamByName('MY_INT').AsInteger := 0 NOK

Post by michellenweiter » Fri 26 Jun 2009 12:31

The version ODAC NET 6.80.0.47 with D2009, ParamByName('x').AsInteger doesn't work anymore!

The version ODAC NET 6.70.05.45 with BDS 2005 is working fine.

Here is the code:

OraQuery.sql := 'Insert into MY_SCHEMA.MY_TABLE (MY_INT)
Values (:MY_INT)';

OraQuery.ParamByName('MY_INT').AsInteger := 0;
OraQuery.prepare;
OraQuery.execsql;

=> exception class EInternalError with message
EOraError with message 'ORA-01438: value larger than specified precision allowed for this colimn'.

In Oracle this attribute is defined as Date and the same code works fine with BD2005 and your version 8.70.

thanks
michel

michellenweiter
Posts: 29
Joined: Thu 09 Jun 2005 06:23
Location: Bern, Switzerland

Post by michellenweiter » Fri 26 Jun 2009 14:06

I got also an error with the

oraQuery.ParamByName('MY_TIME').asTime := MyTTime;
oraQuery.prepare;
oraQuery.execsql;

=> EOraError with message 'ORA-01483: invalid length for DATE or NUMBER bind variable'.

michellenweiter
Posts: 29
Joined: Thu 09 Jun 2005 06:23
Location: Bern, Switzerland

Post by michellenweiter » Fri 26 Jun 2009 14:19

Hint:

it works fine when orasassion.Options.Direct := false,
but NOT when oraSession.Options.Direct := true; which is the mode we must use.

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

Post by Plash » Thu 02 Jul 2009 10:56

We have fixed this problem. The fix will be included in the next build of ODAC.

michellenweiter
Posts: 29
Joined: Thu 09 Jun 2005 06:23
Location: Bern, Switzerland

Post by michellenweiter » Mon 31 Aug 2009 14:15

I downloaded the build 6.80.48 and it dtill does not work!
Are you sure you have tested the '.astime' and in NET Mode?

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

Post by Plash » Tue 01 Sep 2009 07:55

The version 6.80.0.48 was released before the fix. The fix will be included in the next ODAC build.

Post Reply