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: 167
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: 1633
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.

Post Reply