double-nested tables

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jdorlon
Posts: 188
Joined: Fri 05 Jan 2007 22:07

double-nested tables

Post by jdorlon » Fri 26 Mar 2021 20:24

Hello,

If a nested table contains another nested table, I am getting an error from ODAC. It is very easy to reproduce.

Delphi Version 10.1
ODAC Version: 10.3.1
Oracle Server: 19.0
Oracle client: 19.1

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var
  sess: TOraSession;
  qry: TSmartQuery;
  nt: TOraNestedTable;
begin
  sess := TOraSession.Create(nil);
  qry := TSmartQuery.Create(nil);
  nt := TOraNestedTable.Create(nil);

  sess.username := 'my_user_name';
  sess.password := 'secret';
  sess.server := 'my_19c_database';
  sess.loginprompt := false;
  sess.connected := true;
  qry.Session := sess;
  qry.ObjectView := true;
  qry.sql.add('SELECT COLLECT(tab) as ctab');
  qry.sql.add('FROM  (SELECT NEW sys.ora_mining_number_nt(1) tab');
  qry.sql.add('       FROM dual)');
  qry.open;
  if qry.FieldByName('CTAB').DataType = ftDataSet then
  begin
    nt.DataSetField := TDataSetField(qry.FieldByName('CTAB'));
    nt.open;
  end;

end;
The error is: "Unknown data type ....OraObjects.pas, line 7019".

FTable.ItemType is dtTable but that is not handled.

Thanks

-John

MaximG
Devart Team
Posts: 1727
Joined: Mon 06 Jul 2015 11:34

Re: double-nested tables

Post by MaximG » Fri 02 Apr 2021 13:33

Thank you for the information. We have reproduced the issue and will investigate its origin. We will inform you about the results shortly.

jdorlon
Posts: 188
Joined: Fri 05 Jan 2007 22:07

Re: double-nested tables

Post by jdorlon » Tue 14 Sep 2021 21:30

It's fixed in ODAC 12.0.1. Thank you.

MaximG
Devart Team
Posts: 1727
Joined: Mon 06 Jul 2015 11:34

Re: double-nested tables

Post by MaximG » Wed 15 Sep 2021 15:50

Please don't hesitate to contact us with questions concerning our product usage.

jdorlon
Posts: 188
Joined: Fri 05 Jan 2007 22:07

Re: double-nested tables

Post by jdorlon » Wed 06 Oct 2021 21:59

Oops. This one is *not* fixed in 12.0.1. Sorry for the false positive.

MaximG
Devart Team
Posts: 1727
Joined: Mon 06 Jul 2015 11:34

Re: double-nested tables

Post by MaximG » Thu 07 Oct 2021 12:54

Indeed, the error "Unknown data type" was not fixed in ODAC 12.0.1. We will re-investigate the issue and report the results shortly.

MaximG
Devart Team
Posts: 1727
Joined: Mon 06 Jul 2015 11:34

Re: double-nested tables

Post by MaximG » Tue 12 Oct 2021 19:55

We have fixed the "Unknown data type" issue for the OCI mode in ODAC. We are still working to fix it for the Direct mode.
As a temporary solution, we can send you a build that includes the fix for OCI.

jdorlon
Posts: 188
Joined: Fri 05 Jan 2007 22:07

Re: double-nested tables

Post by jdorlon » Tue 12 Oct 2021 21:52

Hi Maxim,

I am not in a big rush on this one. I'll just wait until next public build.

Thank you.

-John

Post Reply