0
votes

I am new to Oracle Apex and trying to create a report. When I click on the pencil icon to edit that row of record, I get an error. Since I build the application from scratch (i.e. building the database on Oracle), I am not sure which step I did wrong and how to solve this error.

Screenshot of the error

  • Here is the complete error_statement in the screenshot:

begin begin select "AGENCY_ID","LOGIN_ID","NAME","ADDRESS_ID","PHONE_NUM","EMAIL" into wwv_flow.g_column_values(1),wwv_flow.g_column_values(2),wwv_flow.g_column_values(3),wwv_flow.g_column_values(4),wwv_flow.g_column_values(5),wwv_flow.g_column_values(6) from "Y20GROUP116"."AGENCY" where "AGENCY_ID" = :p_rowid; end; end;

  • Here is the statement from the debug report which I believe is about the error.

Exception in "Fetch Row from AGENCY": Sqlerrm: ORA-01403: no data found Backtrace: ORA-06512: at line 1 ORA-06512: at "SYS.DBMS_SQL", line 1721 ORA-06512: at "APEX_050100.WWV_FLOW_DYNAMIC_EXEC", line 1880 ORA-06512: at "APEX_050100.WWV_FLOW_DYNAMIC_EXEC", line 1895 ORA-06512: at line 1 ORA-06512: at "SYS.DBMS_SQL", line 1721 ORA-06512: at "APEX_050100.WWV_FLOW_DYNAMIC_EXEC", line 1880 ORA-06512: at "APEX_050100.WWV_FLOW_DYNAMIC_EXEC", line 936 ORA-06512: at "APEX_050100.WWV_FLOW_DML", line 764 ORA-06512: at "APEX_050100.WWV_FLOW_PROCESS_NATIVE", line 538 ORA-06512: at "APEX_050100.WWV_FLOW_PROCESS_NATIVE", line 1137 ORA-06512: at "APEX_050100.WWV_FLOW_PLUGIN", line 2399 ORA-06512: at "APEX_050100.WWV_FLOW_PROCESS", line 200

Actually this error occur in all the tables I create (i.e. other report based on other tables doesn't work as well). I was wondering is there any potential error in the SQL developer will cause this error?

For your reference, here is the SQL of the AGENCY table:

CREATE TABLE AGENCY

(

AGENCY_ID CHAR(6) NOT NULL,

LOGIN_ID CHAR(8) NOT NULL,

NAME VARCHAR2(50) NOT NULL,

ADDRESS_ID CHAR(6) NOT NULL,

PHONE_NUM CHAR(10),

EMAIL VARCHAR2(100) NOT NULL,

CONSTRAINT AGENCY_PK PRIMARY KEY(AGENCY_ID),

CONSTRAINT AGENCY_FK FOREIGN KEY(LOGIN_ID)

REFERENCES LOGIN(LOGIN_ID),

CONSTRAINT AGENCY_FK2 FOREIGN KEY(ADDRESS_ID)

REFERENCES ADDRESS(ADDRESS_ID)

) ;

INSERT INTO AGENCY VALUES ('401', 'AGENCY01', 'RAYWHITE', '601', '0246345777', '[email protected]'); INSERT INTO AGENCY VALUES ('402', 'AGENCY02', 'PRDNATIONWIDE', '602', '0249342000', '[email protected]'); INSERT INTO AGENCY VALUES ('403', 'AGENCY03', 'HIGHLAND PROPERTY AGENTS', '603', '0295424240', '[email protected]'); INSERT INTO AGENCY VALUES ('404', 'AGENCY04', 'HOME789', '604', '0296988818', '[email protected]'); INSERT INTO AGENCY VALUES ('405', 'AGENCY05', 'MORTON', '605', '1300858221', '[email protected]');

Is there any mistake in my SQL which caused the error?

1
What's the full error statement? No data found is usually easy to track down to a logic bug.Scott
Hi Scott, thank you for replying. -Here is the complete error_statement in the screenshot: begin begin select "AGENCY_ID","LOGIN_ID","NAME","ADDRESS_ID","PHONE_NUM","EMAIL" into wwv_flow.g_column_values(1),wwv_flow.g_column_values(2),wwv_flow.g_column_values(3),wwv_flow.g_column_values(4),wwv_flow.g_column_values(5),wwv_flow.g_column_values(6) from "Y20GROUP116"."AGENCY" where "AGENCY_ID" = :p_rowid; end; end;ka wing Chan
Are you processing a tabular form with checkboxes?Scott

1 Answers

1
votes

Statement that raises the error is in the last line of the screenshot you posted.

In App Builder, navigate to that page and search (the page) for e.g. property_id (which is one of columns being selected). Apex will show all appearances of that column so - take a look and check which one of those statements returns nothing; then handle it.