Home » Developer & Programmer » Forms » Commit not saving (Oracle Developer 6i, 6, Xp)
Commit not saving [message #298368] Tue, 05 February 2008 23:20 Go to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Dear Friends,

I have a Master and 3 detail blocks, e.g. Master_1, Master_Detail_2, Detail_2a & Detail_2b.

Master_1
|------- Master_Detail_2
|---------|----------|
Detail_2a Detail_2b

My forms flow is that the Master_1 block is allowed to save one record at a time, all detail blocks can save more then one record.

Now the problem is that the MASTER_DETIAL_2 block is saving only one record for Master_1. E.g.

* Suppose I have entered 1 record against Master_1 and for Master_Detial_2 it save the record no problem in that.

* When I try to enter again the 2 record in Master_Detail_2 it shows me "1 Transaction saved" without any error but when I try to see the record by execute_query on form it doesn't show me that record.

I have also checked my database table the record is not saved even there.

Could plzzzzzzzzzz any body tell me whey this is happening. Oracle says if commit is issued and the message is shown

[number] transaction is saved.

Then the record is saved but in my case it is not. And the funny part is that there is no error by Developer and not from Database.

I have tried to insert the same record into my database by sql command line and it is perfectly saving the record.

Need your help as soon as possible.

Regards,
Azam Khan
Master_1 = record 1
|------Master_Detail_2 = record 1

Re: Commit not saving [message #298378 is a reply to message #298368] Tue, 05 February 2008 23:57 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you write your own code into the KEY-COMMIT trigger (or PRE-COMMIT or POST%COMMIT)? If so, how does it look like? (for example, is there a WHEN OTHERS exception handler? Did you modify SYSTEM.MESSAGE_LEVEL?).
Re: Commit not saving [message #298380 is a reply to message #298378] Wed, 06 February 2008 00:03 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Yes I am using KEY-COMMIT trigger and I have also used EXCEPTION handler with WHEN OTHERS.
Re: Commit not saving [message #298381 is a reply to message #298378] Wed, 06 February 2008 00:05 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
And no I didn't modify any system message
Re: Commit not saving [message #298389 is a reply to message #298381] Wed, 06 February 2008 00:30 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Why did you write your own code? What's wrong with the standard master-detail processing?

Start again in a new form using the Forms wizards, get the basic processing working correctly, and then start adding you own stuff.

David
Re: Commit not saving [message #298416 is a reply to message #298380] Wed, 06 February 2008 01:35 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
azamkhan wrote on Wed, 06 February 2008 07:03
Yes I am using KEY-COMMIT trigger and I have also used EXCEPTION handler with WHEN OTHERS.


WHEN OTHERS is (in many cases) useless; it successfully hides the real reason why something doesn't work as expected. Try to comment it out and see what happens - you might get an error message and find it useful.
Re: Commit not saving [message #298423 is a reply to message #298416] Wed, 06 February 2008 01:44 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
ok will do this... but on WHEN OTHERS I have placed a MESSAGE ('HELLO_WORLD') but it is no displaying which means that focus is not going on WHEN OTHERS.

But any ways I m trying to this
Re: Commit not saving [message #298636 is a reply to message #298423] Wed, 06 February 2008 22:42 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Did you put a 'pause' after the message or duplicate the message command?

David
Re: Commit not saving [message #298645 is a reply to message #298636] Wed, 06 February 2008 23:21 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Dear friends I have solved my problem. I would like to share this with you guys.

It was a simple constraint problem. The Primary Key was violating. I have used KEY-COMMIT trigger and placed a WHEN OTHERS IN EXCEPTION HANDLER.

Because of this EXCEPTION HANDLER "WHEN OTHERS" it was not showing developer's error message.
Re: Commit not saving [message #298646 is a reply to message #298645] Thu, 07 February 2008 00:07 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Just as I thought.
Previous Topic: How to use associative array in procesure
Next Topic: fmx
Goto Forum:
  


Current Time: Sun Feb 09 04:21:27 CST 2025