Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

I need to insert into DB a value, witch end user enter into combobox.

Avatar of Solve
Solve asked on
Oracle Database
44 Comments1 Solution1557 ViewsLast Modified:
Hello,

My tables:
1. T_DAL
columns:
DAL_ID
DAL_PAV
AERO_ID

2. T_AERO
columns:
AERO_ID
AERO_PAV

In my forms block T_DAL I have a ListItem 'CMB_AERO' witch is a data base field (AERO_ID) and here I Populate data from other table T_AERO. I populate this list on when-new-form-instance trigger and populate it from record group
Record Group selekt = 'Select AERO_PAV, to_char(AERO_ID) from T_AERO';

When I inserting a new value into T_DAL, I also assign a value to CMB_AERO (select it from combobox)
But if user enter into this combobox a new data, I want to insert this to my T_AERO table, or open a new form (for enter data for new Aero).

In when-validate-item trigger I put such code

declare

LVal NUMBER;
LLab VARCHAR2(200);
listAero ITEM := find_item('CMB_AERO');

begin

Llab := :T_DAL.cmb_aero;      
select S_AERO.nextval into LVal from dual;
insert into Aviacija.T_AERO(aero_id, aero_pav) values (lval, llab);
add_list_element(listAero, 1, llab, LVal);

end;

I see a new value in a list, but not in DB.

How to insert these new values list, DB and that value user could assign at once to CMB_AERO?
Could you give some advices, comentars?

I would be very pleased

Solveiga


ASKER CERTIFIED SOLUTION
Avatar of Helena Marková
Helena MarkováFlag of Slovakia imageprogrammer-analyst

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 44 Comments.
See Answers