Table type parameter gives error during prepare

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dhalek
Posts: 4
Joined: Mon 16 Mar 2009 10:21
Location: Germany

Table type parameter gives error during prepare

Post by dhalek » Wed 30 Mar 2011 07:37

Hello out there,
yesterday I installed the new ODAC components 7.10.0.5 and now I'm having problems with parameters of table type.
I have a type defined like that:

create or replace type T_VA100_TABLE as table of varchar2(100);

The TOraQuery holds the following SQL:

update dt_webqueue set
datum_erledigt=sysdate
where
rowid in (select value(a)
from table(cast(:ROWIDS as t_va100_table)) a)

The parameter ROWIDS is defined as Table.

When I call OraQuery1.Prepare, I get the error message
"Type of object must be defined"

This did work with ODAC 5.80.
When I leave out the prepare the code runs:

with OraQuery1 do
begin
ParamByName('ROWIDS').Clear;
ParamByName('ROWIDS').AsTable.AllocObject(Session.OCISvcCtx,'DB96C.T_VA100_TABLE');
...
end;

What am I doing wrong?

Regards,
dhalek

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

Post by AlexP » Wed 30 Mar 2011 08:32

Hello,

I could not reproduce the problem.
Please send a complete small sample to alexp*devart*com to demonstrate it.

dhalek
Posts: 4
Joined: Mon 16 Mar 2009 10:21
Location: Germany

Post by dhalek » Wed 30 Mar 2011 10:09

Hello Alex,
the eMail is on the way. Maybe I should mention that I'm using Delphi 2006.

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

Post by AlexP » Wed 30 Mar 2011 11:45

Hello,

Thank you for the information.
We have reproduced the problem.
We will decide which kind of behavior is the best, and notify you as soon as we have any results.

Now you should allocate an object instance before calling the Prepare method, like:

OraQuery.ParamByName('ROWIDS').AsTable.AllocObject(Session.OCISvcCtx,'DB96C.T_VA100_TABLE');
OraQuery.Prepare;

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

Post by AlexP » Mon 18 Apr 2011 11:21

Hello,

We have fixed the problem.
This fix will be included in the next build.

Post Reply