With Oracle Designer, Table API’s (TAPI) can be automatically generated.
This way a pretty nice slct (select) procedure will also be generated.
Following simple code uses this TAPI slct procedure in pl/sql:
declare
arecord cg$emp.cg$row_type;
begin
arecord.str_oid := 57267;
cg$emp.slct(arecord);
dbms_output.put_line(arecord.ename);
end;
Errors look like this:
/*
ORA-20999: TAPI-100:ORA-01403: no data found
ORA-06512: at "GLBN.CG$ERRORS", line 68
ORA-06512: at "GLBN.CG$EMP", line 200
ORA-06512: at line 6
*/
.