0

Hi, I created a simple application in Oracle APEX, and on the first page (blank page), I put a textbox. Now, I want to be able to insert the input data from the textbox into the tables, e.g. insert new first name, last name etc... Can someone tell me if there's a simple way to do this, or I must create some triggers or functions ?

2
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by robertmacedonia
0

hi
ur saying that u have already created a blank page with a text box to enter data which is to be stored ?
if thats the case its always suggested to use a row level before/after trigger to accept data instead of functions.
yes ofcourse we can achive with functions too but its always beter to use triggers for these kind of...............

0

if u want the trigger code what actually it goes with then reply me ill try my way

0

I found it better to use a "form" page, which is automatically bound to one table, so I will be able to insert data into that particular table. But, I have a problem here too :( Since my table (the one I'm inserting in) already contains data, and the primary keys (numbers) are not - auto - increment (i have been entering these values manually 'till now in the database), now when I try to enter data it gives me an error. So, I wrote a sequence that increments the values by one, and I wrote a trigger too, that uses that sequence. But, it only works when used on an empty table. When I try to use it with the table which contains data, it gives me an error again... So I do not know is there any other way, than deleting the data in the table. Regards

0

ok now u r very much clear so the problem is to update an already data containing table
k
ill check it out and reply soon as i come up with it

0

I created a sequence STARTING WITH the value that's by one greater than the maximum value in my primary key column, so there wouldn't be any errors (no overlapping). So, that actually solves my problem, so thank you for the assistance. Regards.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.