Home » Developer & Programmer » Forms » unable to update a record
unable to update a record [message #79585] Mon, 24 June 2002 02:08 Go to next message
sumit deb
Messages: 1
Registered: June 2002
Junior Member
i have written a when button pressed trigger to update a particulat column in forms 6.0. I have just written an update statement .....

When i run the form.....it gives me an error ..
"Unable to insert the record"........actually it tries to insert a whole new record with the updated details....and that's why it is violating the primary key constraint ....but why is it trying to insert a new record when i am just trying to update a single field.

please help me.....
Re: unable to update a record [message #79586 is a reply to message #79585] Mon, 24 June 2002 02:41 Go to previous messageGo to next message
Ani
Messages: 56
Registered: November 2000
Member
Hi Sumit,
pls check for the :system.form_status. mostly instead of being in 'QUERY' it is in 'INSERT'. r u assigning any value anywhere in post-change or key-next?
pls check.
All the best
Ani
Re: unable to update a record [message #79589 is a reply to message #79585] Mon, 24 June 2002 03:23 Go to previous messageGo to next message
Remash
Messages: 52
Registered: November 2000
Member
Hi

Before COMMIT_FORM or COMMIT, clear the block using CLEAR_BLOCK(No_Validate)

Regards
Re: unable to update a record [message #79594 is a reply to message #79585] Mon, 24 June 2002 08:28 Go to previous message
Tyler
Messages: 123
Registered: January 2002
Senior Member
If you are trying to update, you have to be executing a runtime where_string and then just using commit_form... but if you are doing a manual coded update
statement then the block can not be a database block, it has to be just a stand alone anonymous block or the database will see the database items changed and assume that an insert is taking place and try to accomplish an insert.

if the previous replies didn't help, I hope this did...

Cya
T
Previous Topic: Reg clear block
Next Topic: problems in menu
Goto Forum:
  


Current Time: Fri Mar 29 05:10:23 CDT 2024