Home » Developer & Programmer » Forms » Save changes to a form problem when populating the form using LOV
Save changes to a form problem when populating the form using LOV [message #234680] Wed, 02 May 2007 16:48 Go to next message
houbcm
Messages: 14
Registered: April 2007
Junior Member
I have a form with four columns from a table. When i used a LOV to populate the form, and then save the changes to the form, it doesn't work correctly. It always save the record as the first row. How to fix it. Thanks.
Re: Save changes to a form problem when populating the form using LOV [message #234794 is a reply to message #234680] Thu, 03 May 2007 03:25 Go to previous messageGo to next message
sameer_am2002
Messages: 129
Registered: September 2002
Senior Member
Your problem is that you are not creating another record so the values keeps overriding at first record.
Re: Save changes to a form problem when populating the form using LOV [message #234983 is a reply to message #234794] Thu, 03 May 2007 11:00 Go to previous messageGo to next message
houbcm
Messages: 14
Registered: April 2007
Junior Member
My form has been designed this way: User populates the form using LOV -> Make changes to the record -> Click the 'Save' button in the form to save the changes.

The Pl/SQL for 'Save' button is: Commit;

It looks to me the forms has been updated using rowid, but when i populate the form using LOV, the rowid doesn't change accordingly. The rowid is always equal to 1.

Could you tell me how to fix it. Thanks.
Re: Save changes to a form problem when populating the form using LOV [message #235035 is a reply to message #234983] Thu, 03 May 2007 16:29 Go to previous messageGo to next message
Littlefoot
Messages: 20894
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What are you talking about? It is a PSEUDOCOLUMN! You can not INSERT, UPDATE or DELETE value of the rowid pseudocolumn.
Re: Save changes to a form problem when populating the form using LOV [message #235036 is a reply to message #235035] Thu, 03 May 2007 16:47 Go to previous messageGo to next message
houbcm
Messages: 14
Registered: April 2007
Junior Member
I am not updating the rowid. When i click 'Save' button, the oracle form is updating the row using something like: update tablename set col1= , col2= where rowid = . It looks to me: when populating the form using LOV, the form doesn't know the current rowid. It always picks the first rowid and updates the first row.
Re: Save changes to a form problem when populating the form using LOV [message #236490 is a reply to message #235036] Thu, 10 May 2007 01:55 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Look at:
Populate block using cursor
http://www.orafaq.com/forum/m/605/67467/?srch=populate+block+cursor+create_record#msg_605
and my feelings about it.
http://www.orafaq.com/forum/m/134237/67467/?srch=populate+block+cursor+create_record#msg_134237
Another one of my rants.
http://www.orafaq.com/forum/mv/msg/74947/213213/67467/#msg_213213

Loading data into a block MANUALLY
http://www.orafaq.com/forum/m/111031/67693/#msg_111031
MANUAL previous and next master key record retrieval
http://www.orafaq.com/forum/m/111031/67693/#msg_111031
Sample MANUAL get employees form
http://www.orafaq.com/forum/t/52330/67467/

David
Previous Topic: Life of a Form
Next Topic: ORACLE GRAPHICS PLL OG.PLL
Goto Forum:
  


Current Time: Mon Dec 05 13:14:43 CST 2016

Total time taken to generate the page: 0.11157 seconds