Home » Developer & Programmer » Forms » Insert data 2 tables at a time through Form 6i (Form 6i)
Insert data 2 tables at a time through Form 6i [message #439259] Fri, 15 January 2010 07:38 Go to next message
allianz2010
Messages: 101
Registered: October 2009
Location: Pakistan
Senior Member

i want to create history of any customer detail that whats items he purchase from my shop. and i create table for this purpose..

my sale invoice form is Master detail form .
and i m use insert into command for this purpose .
and i add first record successfully.
but i can not understand that how can i pick 2nd row from form's detail section...

i think :system.cursor_record use for this purpose but i have no idea for :system.cursor_record .

please tell me about :system.cursor_record ...
or
any other idea..

i also attached my form screen..
and i use simple insert into command for this purpose
  • Attachment: sale_invo.JPG
    (Size: 83.04KB, Downloaded 113 times)
Re: Insert data 2 tables at a time through Form 6i [message #439261 is a reply to message #439259] Fri, 15 January 2010 07:42 Go to previous messageGo to next message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
You're going to have to explain the problem in more detail.
Why are you using an insert statement instead of forms default functionality?
What trigger are you calling the insert from?
Your subject mentions 2 tables but you only talk about inserting into 1 table, how many tables are involved and what is the relationship between them?

Form builder help will tell you everything you need to know about :system.cursor_record and all the other system variables.
Re: Insert data 2 tables at a time through Form 6i [message #439263 is a reply to message #439261] Fri, 15 January 2010 08:04 Go to previous messageGo to next message
allianz2010
Messages: 101
Registered: October 2009
Location: Pakistan
Senior Member

Thanks for reply cookiemonster

please find the attachment...

i show three tables in this picture...
Thanks again for your reply...
  • Attachment: tales.JPG
    (Size: 74.58KB, Downloaded 136 times)
Re: Insert data 2 tables at a time through Form 6i [message #439264 is a reply to message #439259] Fri, 15 January 2010 08:08 Go to previous messageGo to next message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
That doesn't help much. Is cus_bill_manager a summary of the other two? A linking table? A history table? Is it detail or master?
Which table (if any) is your datablock based on?
And what about the rest of my questions?
Re: Insert data 2 tables at a time through Form 6i [message #439276 is a reply to message #439264] Fri, 15 January 2010 08:58 Go to previous messageGo to next message
allianz2010
Messages: 101
Registered: October 2009
Location: Pakistan
Senior Member

Sir Thanks for your reply...

This is not the meter of Master Detail Table...

Sir if you have any idea about using loop in tabular type form

i mean that i have i field and i set property of this field is
number of items displayed =5
and i want to access this field in loop for any purpose.

suppose i want to pick 2nd number of items.
how can i do it...

sorry sir i do not give answers about your question...

Thanks again for your reply...
  • Attachment: pick.JPG
    (Size: 18.41KB, Downloaded 119 times)
Re: Insert data 2 tables at a time through Form 6i [message #439291 is a reply to message #439259] Fri, 15 January 2010 09:30 Go to previous message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
I'm still not entirely sure what you are trying to achieve, but the only way to loop through data in a datablock is to actually navigate through the records using go_record/next_record.
Simplest form is this:
BEGIN

first_record;

LOOP

  <do stuff>
  EXIT WHEN :system.last_record = 'TRUE';
  next_record;

END LOOP;


And instead of apologising for not answering my questions why don't you just answer them? They aren't difficult and it might make it easier for me to help you.
Previous Topic: Find_menu_item
Next Topic: Html Browser how to create in oracle developer 6i
Goto Forum:
  


Current Time: Wed Sep 28 14:22:18 CDT 2016

Total time taken to generate the page: 0.24574 seconds