Home » Developer & Programmer » Forms » Linking a list box to a database field!
Linking a list box to a database field! [message #469074] Tue, 03 August 2010 03:21 Go to next message
ahazin
Messages: 39
Registered: August 2010
Member
I remember a method in which I used a property in the property pallete to specify the query in which i wanted the list linked with, it gave me the option to input a static list or as mentioned a dynamic list which was dependent on a query entry, but I cant for the life of me remember where this property was.

Any ideas?

Any help will be greatly appreciated.
Re: Linking a list box to a database field! [message #469079 is a reply to message #469074] Tue, 03 August 2010 03:45 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
I'm not aware of any such property, and I've just had a look through the property pallete and can't see anything that matches your description.
Are you sure you're not getting confused with something else?
Re: Linking a list box to a database field! [message #469084 is a reply to message #469079] Tue, 03 August 2010 03:59 Go to previous messageGo to next message
ahazin
Messages: 39
Registered: August 2010
Member
I possibly could be in that case, what method would you use to populate a list box with values from a specific field in a database then to ensure that it updates dynamically?

Thanks for your input so far.
Re: Linking a list box to a database field! [message #469089 is a reply to message #469084] Tue, 03 August 2010 04:26 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
populate_list or add_list_elememt, but I'd be careful with a dynamically changing list - that can cause problems:
You can't remove an element that's in use.
You can't query a record where the current value doesn't match anything the list recognizes.

If you want dyanmic you're probably better off using an LOV.
Re: Linking a list box to a database field! [message #469101 is a reply to message #469089] Tue, 03 August 2010 05:40 Go to previous message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,

Also try this.


DECLARE
    CURSOR C_COMPANY IS 
 SELECT Latin_desc DN FROM GL_COMPANY ORDER BY GL_COMPANY_ID;
 					 
 BEGIN
     CLEAR_LIST('GL_DIVISION.CMP');
     FOR REC IN C_COMPANY  LOOP
	
     add_list_element('GL_DIVISION.CMP',1,REC.DN,REC.DN);
     END LOOP;
 END;



END;


But also be careful that what Mr.cookiemonster said.

Regards,
Irfan
Previous Topic: FRM-40104,FRM-40105,FRM-41045 for the calendar after migration
Next Topic: Disabling the Default menu Items in Oracle Forms 10g
Goto Forum:
  


Current Time: Thu Sep 19 13:07:52 CDT 2024