Oracle Forms 10g code

10 pts.
Tags:
Oracle 10g
Oracle Forms
Oracle Table
how to show all empid in list item in oracle form during the runtime...

pl give me details with code.

table structure is    create table dept( empid int,ename varchar2(20));

gv me full code of the  under the form_instance_click.........

                            



Software/Hardware used:
oracle form 10g...

Answer Wiki

Thanks. We'll let you know when a new response is added.

This is <b>one way</b> to do it:

<pre>Declare
nIndex number := 0;
Begin
for i in (SELECT empid,ename FROM dept) loop
nIndex := nIndex + 1;
add_list_element(‘YourBlock.YourListItem’,nIndex,i.ename ,i.empid);
end loop;
end;</pre>

You could also do it using a record group.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Jfryynmt
    Here is how to do with a package: create or replace Package Const as TYPE rec_DDB IS Record ( dt varchar2(255), /* value to go into data part of ddb*/ ky varchar2(50) /* value to go into key part of ddb */ ); TYPE tab_DDB IS TABLE OF rec_DDB INDEX BY BINARY_INTEGER; procedure Get_LOV ( In_Name in varchar2, tDDB OUT ddb.tab_DDB ); end const; ------------------- create or replace Package body Const as procedure Get_LOV ( In_Name in varchar2, tDDB OUT tab_DDB ) is ptr pls_integer; cursor c1 is select ... from ... where ... order by ...; x1 c1%rowtype; begin tDDB.DELETE; ptr := 0; for x1 in c1 loop ptr := ptr + 1; tDDB(ptr).dt := x1.constant_meaning; tDDB(ptr).ky := x1.constant_value; end loop; end Get_LOV; end const; ---------- in Forms (in when-new-form-instance) declare xDDB ddb.tab_DDB; BEGIN const.get_lov('parameter-to-const', xDDB); Clear_List('b1.field_name'); for ptr in nvl(xDDB.first,2)..nvl(xDDB.last,1) loop add_list_element('b1.field_name', ptr, xDDB(ptr).dt, xDDB(ptr).ky); end loop; xddb.delete; end;
    70 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following