saving certain records [message #233857] |
Fri, 27 April 2007 15:22 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
deahayes3
Messages: 203 Registered: May 2006
|
Senior Member |
![doublemint78%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
Please Help. I have a question. I have a datablock that creates over 50 records and that displays them in a form, if a user changes a few of the records , how can i only save those records in the table instead of all records displayed?? Right now it saves all records but I only want to save to the table the 2-3 records a user changes.
Any help is appreciated
|
|
|
|
Re: saving certain records [message #234442 is a reply to message #233862] |
Tue, 01 May 2007 10:46 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
deahayes3
Messages: 203 Registered: May 2006
|
Senior Member |
![doublemint78%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
the first thing I am doing is a search for all task in one project I created a cursor (that pulls these tasks from another table and dumps them in my new table) that is called in a loop, each record is now displayed (about 100 in the new table) Now I want the user to go through the records and update certain records and save only those updated records but when hit save the form saves all 100 records to the new table what should I do , yes this is forms6i
[Updated on: Tue, 01 May 2007 10:49] Report message to a moderator
|
|
|
Re: saving certain records [message #234456 is a reply to message #234442] |
Tue, 01 May 2007 12:02 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
This is how I understood your problem (which doesn't have to mean that I'm right): you fill a database block, do something with those records, press "Save" and wonder how come that all records got saved? Well, if you put them in there, why do you expect only some of them to be saved?
One way would be fetching records from the "original" table into a database block (created upon the "original" table), creating additional item (visible or not, let's say of a NUMBER datatype), setting it to 1 if the record has been changed. Then, in a KEY-COMMIT trigger, move into your target table only those records that have 1 in our "flag" item.
|
|
|