Home » RDBMS Server » Server Administration » How to insert multiple rows
How to insert multiple rows [message #371841] Wed, 13 December 2000 01:40 Go to next message
Angela Anderson
Messages: 1
Registered: December 2000
Junior Member
In Developer 6, I created 5 rows. When I enter in data, whenever I try to submit the data, it only inserts the current row that I am in into the database. The button that submits the data looks like this:

insert into Invoice(InvoiceID, InvoiceName...)
values (:invoice.InvoiceId, :invoice.InvoiceName...)

Is there a way I can use a loop that will keep inserting the rows (starting from the first row) and exit when it reaches a null value?

thanks people :)
Re: How to insert multiple rows [message #371845 is a reply to message #371841] Wed, 13 December 2000 08:23 Go to previous messageGo to next message
Shanthi Ramayanapu
Messages: 22
Registered: October 2000
Junior Member
Looks like you have your key_commit trigger at item level. Change it to Form level and Oracle will take care of commiting all rows.

Shanthi
Re: How to insert multiple rows [message #371846 is a reply to message #371841] Wed, 13 December 2000 08:26 Go to previous message
Prem
Messages: 79
Registered: August 1998
Member
Is there any specific reason as to why you are handling the inserts explicitly? By issuing a commit statement in the when-button-pressed, forms decides whether a record in the block needs to be updated or inserted. You don't have to loop thru the records manually. By doing so, all the records in your multirecord block, if new, will be inserted into the table.

hth

Prem :)
Previous Topic: to find the first day of the month
Next Topic: Re: WHERE column_name IN variable_name
Goto Forum:
  


Current Time: Sun Dec 22 20:33:12 CST 2024