I have a stored procedure which take back a refcursor containing nested table.
When I try to access to the nested table, I get a No such field exception. When I used a select tratement, returning identical cursor, it worked fine. When I call the procedure from PL/SQL developer, the refcursor contains forrect values and nested tables.
When I try to access to the nested table, I get a No such field exception. When I used a select tratement, returning identical cursor, it worked fine. When I call the procedure from PL/SQL developer, the refcursor contains forrect values and nested tables.
Code:
oqc := TOracleQuery.Create(nil);
try
oqc.session := os1;
os1.Connected := true;
oqW.SetVariable('pCount', 7);
oqW.SetComplexVariable('pLista', oqc);
oqW.Execute;
try
while not oqc.Eof do begin
fo := oqc.ObjField('NT');
if fo.IsCollection then begin
for i := 0 to fo.ElementCount - 1 do begin
if fo.ElementExists(i) then begin
iv := fo[i].GetAttr('NID');
end;
end;
end;
end;
oq1.next;
end;
finally
oqc.Close;
end;