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
Table type parameter gives error during prepare
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;
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;