updates [message #116325] |
Tue, 19 April 2005 08:23 |
jonmich005
Messages: 53 Registered: April 2005
|
Member |
|
|
I have a Data block and it's property of 'Number of records displayed ' stand s on 15.
Now if I want to update it, all the 15 records are update.
Not only the one I adjusted.
How can I resolve this problem?
this is my update-query:
update lds_tl_grid
set tl_grid_activity = :lds_tl_grid.tl_grid_activity
,tl_grid_int_1 = :lds_tl_grid.tl_grid_int_1
,tl_grid_int_2 = :lds_tl_grid.tl_grid_int_2
,tl_grid_int_3 = :lds_tl_grid.tl_grid_int_3
where tl_grid_veh_id = :lds_vehicle.veh_id;
commit;
All my 4 records are updated if I only adjust int_1.
How can I make this work?
|
|
|
|
Re: updates [message #116457 is a reply to message #116325] |
Wed, 20 April 2005 03:44 |
jonmich005
Messages: 53 Registered: April 2005
|
Member |
|
|
I have to update my form when I click on a button, so I have to write a trigger.
I have a form with 3 data blocks from 3 tables.
But when I click on the button, I get the message that the unique constraint is violated. But it's violated from a data block on my form BUT that is not in my update-statement, so a table that I not want to update.
Can you explain me this?
|
|
|
|
Re: updates [message #116467 is a reply to message #116462] |
Wed, 20 April 2005 04:20 |
jonmich005
Messages: 53 Registered: April 2005
|
Member |
|
|
I still get that error, but that means that my primary key will be duplicated if I'm not mistaking.
But I don't change my primary key, why do I get that message then?
I only need to update the fields that I've changed, not the field that weren't changed.
How does this come?
|
|
|
Re: updates [message #116602 is a reply to message #116325] |
Wed, 20 April 2005 19:47 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
I believe that the trigger that is giving you your primary key sequence number is firing for every record every time. Search the 'fmb' for 'nextval' and put it in a place where it is only actioned when the primary key field is NULL and the record status is NEW.
|
|
|