Page 1 of 1

Does ODAC supports PL/SQL tables of binary_double?

Posted: Mon 06 Jul 2009 16:08
by alexmcc
I have package and procedure in it:

Code: Select all

CREATE OR REPLACE PACKAGE STARK_SCH."PRED_DATA" IS

...

PROCEDURE get_filter_content(p_scname_out   	OUT NOCOPY stark_common.t_varchar2_array,
 		       	     p_name_out     	OUT NOCOPY stark_common.t_varchar2_array,
		       	     p_mjdb_out     	OUT NOCOPY stark_common.t_number_array,
		     	     p_timesb_out   	OUT NOCOPY stark_common.t_binary_double_array,
		    	     p_mjde_out     	OUT NOCOPY stark_common.t_number_array,
		             p_timese_out   	OUT NOCOPY stark_common.t_binary_double_array,
		             p_mainmodel_out  	OUT NOCOPY stark_common.t_varchar2_array,
                             p_scmodel_out    	OUT NOCOPY stark_common.t_varchar2_array,
                             p_funcname_out   	OUT NOCOPY stark_common.t_varchar2_array,
                             p_reframe_out    	OUT NOCOPY stark_common.t_varchar2_array,
                             p_timescale_out  	OUT NOCOPY stark_common.t_varchar2_array,
                             p_isvsource_out  	OUT NOCOPY stark_common.t_varchar2_array,
                             p_plnformat_out  	OUT NOCOPY stark_common.t_varchar2_array,
                             p_plnfilename_out  OUT NOCOPY stark_common.t_varchar2_array,
                             p_dmjdc_out        OUT NOCOPY stark_common.t_binary_double_array,
                             p_deflag_out       OUT NOCOPY stark_common.t_varchar2_array);

.......

And package with type declarations:

CREATE OR REPLACE PACKAGE STARK_SCH."STARK_COMMON" AS

  TYPE t_varchar2_array IS TABLE OF VARCHAR2(255) INDEX BY PLS_INTEGER;
  TYPE t_number_array IS TABLE OF NUMBER  INDEX BY PLS_INTEGER;
  TYPE t_date_array IS TABLE OF DATE INDEX BY PLS_INTEGER;
  TYPE t_binary_double_array IS TABLE OF BINARY_DOUBLE  INDEX BY PLS_INTEGER;

....
I try to call PROCEDURE get_filter_content with ODAC StoredProc component.
The call (on ExecProc) gives to me this error:

Project Project1.exe raised exception class EOraError with message 'ORA-06550: line 2, column 73:
PLS-00418: array bind type must match PL/SQL table row type
....

If I change datatype from stark_common.t_binary_double_array to stark_common.t_number_array, the call is made without errors.

Does ODAC supports PL/SQL tables of binary_double?


Software Used:
Delphi 7.0
ODAC 6.50.0.39
Oracle Server 10.2.0.4
Oracle Client 10.2.0.4

Posted: Tue 07 Jul 2009 07:12
by Plash
ODAC does not support parameters that are tables of binary_double.

Posted: Tue 07 Jul 2009 08:00
by alexmcc
And will support in next versions?

And what about this:

CREATE TYPE t_binary_double_array AS TABLE OF BINARY_DOUBLE;

I will try, of course.

Posted: Wed 08 Jul 2009 08:15
by Plash
We'll consider the possibility to support parameters of type "associative array of binary_double" in the future ODAC versions.

ODAC supports nested tables of binary_double when they are created as a separate type. In this case you work with the parameter using TOraNestTable object. For example (you need to add OraObjects to 'uses'):

Code: Select all

var
  Tbl: TOraNestTable;
  d: double;
begin
  Tbl := OraStoredProc.ParamByName('P').AsTable;
  Tbl.AllocObject(OraSession.OCISvcCtx, 't_binary_array');
  OraStoredProc.Execute;
  d := Tbl.ItemAsFloat[1];
end;

Posted: Mon 13 Jul 2009 12:17
by alexmcc
Has made:

CREATE OR REPLACE TYPE T_BINARY_DOUBLE_ARRAY AS TABLE OF BINARY_DOUBLE;

CREATE OR REPLACE PROCEDURE TEST_BD_TABLE(p_array OUT T_BINARY_DOUBLE_ARRAY) IS
BEGIN
p_array := T_BINARY_DOUBLE_ARRAY(to_binary_double('129200.2222333'));
END TEST_BD_TABLE;

set serveroutput on size 1000000;
DECLARE
data T_BINARY_DOUBLE_ARRAY;
BEGIN
TEST_BD_TABLE(data);
DBMS_OUTPUT.PUT_LINE(to_char(data(1)));
END;

1,292002222333E+005

procedure TForm1.Button1Click(Sender: TObject);
var
Tbl: TOraNestTable;
d: double;
begin
Tbl := OraStoredProc1.ParamByName('P_ARRAY').AsTable;
Tbl.AllocObject(OraSession1.OCISvcCtx, 'T_BINARY_DOUBLE_ARRAY');
OraStoredProc1.Execute;
d := Tbl.ItemAsFloat[1];
end;


d have trash value, for example 1,4821..E-323

Any suggestions?

ODAC 6.80.0.48 Trial Edition, the subscription has ended, but we will renew it in a month.

Posted: Tue 14 Jul 2009 08:57
by Plash
The current ODAC version does not support BINARY_DOUBLE in nested tables.
But we will add such support in the next ODAC build.

Posted: Tue 14 Jul 2009 09:31
by alexmcc
Thank you.
Can you tell me when this support will be added?
And support for PL/SQL table of BINARY_DOUBLE if you have a plan to do this.

Posted: Wed 15 Jul 2009 08:51
by Plash
We are planning to release the new ODAC build in two weeks.

What is about new release?

Posted: Mon 03 Aug 2009 14:46
by alexmcc
What is about new release?
We wait for it very much!

Posted: Tue 04 Aug 2009 07:11
by Plash
We are planning to release new ODAC build during this week.

Posted: Thu 20 Aug 2009 13:23
by alexmcc
Have you new information about new release?
We wait, we hope.

Posted: Thu 20 Aug 2009 16:54
by jfudickar
I think, they will wait for the D2010 release.

But this are only my thoughts, nothing official.

Kind regards
Jens

Posted: Fri 21 Aug 2009 07:17
by Plash
We are planning to release new ODAC build next week.