Page 1 of 1

double-nested tables

Posted: Fri 26 Mar 2021 20:24
by jdorlon
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

Re: double-nested tables

Posted: Fri 02 Apr 2021 13:33
by MaximG
Thank you for the information. We have reproduced the issue and will investigate its origin. We will inform you about the results shortly.

Re: double-nested tables

Posted: Tue 14 Sep 2021 21:30
by jdorlon
It's fixed in ODAC 12.0.1. Thank you.

Re: double-nested tables

Posted: Wed 15 Sep 2021 15:50
by MaximG
Please don't hesitate to contact us with questions concerning our product usage.

Re: double-nested tables

Posted: Wed 06 Oct 2021 21:59
by jdorlon
Oops. This one is *not* fixed in 12.0.1. Sorry for the false positive.

Re: double-nested tables

Posted: Thu 07 Oct 2021 12:54
by MaximG
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.

Re: double-nested tables

Posted: Tue 12 Oct 2021 19:55
by MaximG
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.

Re: double-nested tables

Posted: Tue 12 Oct 2021 21:52
by jdorlon
Hi Maxim,

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

Thank you.

-John