Search code examples
oracle-databaseoracle-apexoracle-apex-5

Can't insert Data to Database via PL/SQL


I am building a "insert to Database" Page. I Have 2 Datepicker and one Dropdown box.

When I am Running My Code The Value which will be send is NULL for every 3 Page-Elements.

:P8_DATE_START is a Datepicker. :P8_DATE_END is a Datepicker. :P8_COOKD is a Dropdown with an ID.

My Code:

INSERT INTO HOOR_Main (ID, NAME, START_DATE, END_DATE, DESCRIPTION, TASK_OWNER, STATUS)
VALUES (13, 1, :P8_DATE_START, :P8_DATE_END, 'Das ist ein Test via SQL', :P8_COOKD, 1);

My Database: Database Screenshot

How can I Send the Values of the Page-Elements to Database?

EDIT: It is also not possible to Insert only :P8_COOKD. So I think the Problem is by getting the Information from the Element.


Solution

  • In order for the database session to pick up the value of a page item in a dynamic action, you need to put it in "Items to Submit" for the pl/sql action.

    --Koen