Reputation: 29
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.
Upvotes: 0
Views: 413
Reputation: 18685
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
Upvotes: 1
Reputation: 36
Maybe you need to convert first your output from Datepicker? Something like:
INSERT INTO HOOR_Main (ID, NAME, START_DATE, END_DATE, DESCRIPTION, TASK_OWNER, STATUS)
VALUES (13, 1, TO_DATE(:P8_DATE_START, 'yyyy-mm-dd'), TO_DATE(:P8_DATE_END, 'yyyy-mm-dd'), 'Das ist ein Test via SQL', :P8_COOKD, 1);
Upvotes: 0