Home » Developer & Programmer » Forms » Issue in creating control Items at Run time.
Issue in creating control Items at Run time. [message #416848] Tue, 04 August 2009 14:06 Go to next message
gurusuryas
Messages: 49
Registered: March 2009
Location: Chennai
Member

Hi friends,

I have posted one query here,

I required some control items to insert data at run time. please find my attached form below. After i entered number in textbox i need the control items will be created at specified block.Control items.

My request is How to enter data into these items and will be save in Database.

for Ex:

if i entered 8 into Textbox means , 8 records will be created .

Can i use CREATE_RECORD here ?

please write your solution.

Thanks

Gurus
Re: Issue in creating control Items at Run time. [message #416853 is a reply to message #416848] Tue, 04 August 2009 14:56 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You can create any number of records; they just can't be empty. Otherwise, you'd get "FRM-40102: Record must be entered or deleted first" error.
Re: Issue in creating control Items at Run time. [message #416866 is a reply to message #416853] Tue, 04 August 2009 18:05 Go to previous messageGo to next message
gurusuryas
Messages: 49
Registered: March 2009
Location: Chennai
Member



thanks for your more information,

We can not create control items at run time in oracle forms?

any other suggestions?




gurus
Re: Issue in creating control Items at Run time. [message #416889 is a reply to message #416866] Wed, 05 August 2009 00:56 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Yes. Use Oracle Forms as it was designed to be used. Base your block on a table, define the block as showing 8 records, put the information into the items and when you exit the form or press the save button they will be stored in the database.

David
Re: Issue in creating control Items at Run time. [message #417006 is a reply to message #416848] Wed, 05 August 2009 11:56 Go to previous messageGo to next message
gurusuryas
Messages: 49
Registered: March 2009
Location: Chennai
Member



Can you write me that Whether followings Codes are correct step or not?
----
declare

CURSOR C3 IS SELECT CHAPTER,PAGES,REC_DATE,DUE_DATE,STAGES FROM CHAPT WHERE ROWNUM<=:msp.textbox_num;
BEGIN
LAST_RECORD;
FOR I IN C3 LOOP
CREATE_RECORD;
:CHAPT.CHAPTER := C3.CHAPTER;
:CHAPT.PAGES :=C3.PAGES;
:CHAPT.REC_DATE :=REC_DATE;
:CHAPT.DUE_DATE:=DUE_DATE;
:CHAPT.STAGES:=STAGES;

END LOOP;
FIRST_RECORD;
END;

---
Re: Issue in creating control Items at Run time. [message #417025 is a reply to message #417006] Wed, 05 August 2009 14:18 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As it is written, no - it won't work. Too many errors. But, its principle seems to be OK - it would create a few records. Why didn't you try it, anyway?
Re: Issue in creating control Items at Run time. [message #417052 is a reply to message #416848] Wed, 05 August 2009 17:25 Go to previous messageGo to next message
gurusuryas
Messages: 49
Registered: March 2009
Location: Chennai
Member


Thanks for your information.

Can i know the actual work of CREATE_RECORD;.

CREATE_RECORD do not allow Empty Record?

Re: Issue in creating control Items at Run time. [message #417063 is a reply to message #417052] Wed, 05 August 2009 19:47 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Populate block using cursor
http://www.orafaq.com/forum/m/605/67467/?srch=populate+block+cursor+create_record#msg_605
and my feelings about it.
http://www.orafaq.com/forum/m/134237/67467/?srch=populate+block+cursor+create_record#msg_134237
Another one of my rants.
http://www.orafaq.com/forum/mv/msg/74947/213213/67467/#msg_213213

David
Re: Issue in creating control Items at Run time. [message #417245 is a reply to message #416848] Thu, 06 August 2009 12:57 Go to previous messageGo to next message
gurusuryas
Messages: 49
Registered: March 2009
Location: Chennai
Member



Hi djmartin,

I followed your links but till, i could not able to get my solution.

once again am saying my requirement.

I have One text box.It allows Number as Input.
When i entered number into this Text box, the number of items to be displayed in my block at run time. then i need enter data into those items and save into DB.

Eg : Entered 20

so 20 text box items to be displayed in block.

Thanks

Gurus
Re: Issue in creating control Items at Run time. [message #417247 is a reply to message #417245] Thu, 06 August 2009 13:06 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This is how I understood your question: at the moment you start the form, there is only a "number of records" control item and a button which, once it is pushed, should create as many records as the number in the "number of records" item contains.

If that's so, well, you probably do not want to do that. It *might* be possible, but causes too many pain to maintain such a design and, simply, isn't worth it. I'd suggest you to create a multi-record block with as many records as you wish and then let Forms deal with the rest of the functionality.

However, if you badly need to use such a design, you should probably choose another tool (and not Oracle Forms).

Re: Issue in creating control Items at Run time. [message #417261 is a reply to message #416848] Thu, 06 August 2009 15:28 Go to previous messageGo to next message
gurusuryas
Messages: 49
Registered: March 2009
Location: Chennai
Member



Yes. You understood right. but i can try other ways in oracle forms. I am in try, i hope will solve this problem soon.
Re: Issue in creating control Items at Run time. [message #417275 is a reply to message #417245] Thu, 06 August 2009 20:02 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
As LF as said, this is NOT how Oracle Forms was designed to work. Either use the default behaviour or use a different tool.

David
Re: Issue in creating control Items at Run time. [message #418402 is a reply to message #417275] Fri, 14 August 2009 13:08 Go to previous message
gurusuryas
Messages: 49
Registered: March 2009
Location: Chennai
Member



Hi friends,

i found one new article regarding add Items at Run time.

http://forms.pjc.bean.over-blog.com/article-2040592.html

please visit here and read it and tell me some way to solve my problem.

how can i edit in /forms/server/formsweb.cfg.

thanks







Previous Topic: FRM-50016: Legal characters are 0-9-+E
Next Topic: How to transfer records from one datablock to another datablock with in the form
Goto Forum:
  


Current Time: Fri Sep 20 02:24:09 CDT 2024