How to insert multiple rows [message #371841] |
Wed, 13 December 2000 01:40 |
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 #371846 is a reply to message #371841] |
Wed, 13 December 2000 08:26 |
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 :)
|
|
|