Home » Developer & Programmer » Forms » Data Committing problem (No Changes to Save)
Data Committing problem (No Changes to Save) [message #153226] Fri, 30 December 2005 02:46 Go to next message
Atul P
Messages: 61
Registered: June 2003
Location: Mumbai-Jakarta
Member

HI

I am using Oracle Form 6i.
In one form I have 3 blocks:
1. HEADER - Database Block
2. Control Block.
3. DETAILS - Database BLock

Now fields:
1. Bank Code : Part Of COntrol BLock on Canvas
2. Branch : Part of Control BLock on Canvas

During run-time User Inputs Values in above 2 fields
which I pass to my DETAILS - Database Block while committing data.

IN Post Query Value I fetch values
for Bank Code and Branch and Display at Runtime in my
COntrol BLock.

No when I wish to change these values,
While Updating there is no chnage in database Values.
The reason for this is, none of the Database BLock Status
have changed. So data is not committed.

What is the Best way so that my HEADER and DETAILS both
get Updated even though no changes directly on any fields
belonging to those Blocks.

In short what code should I write to Change the Status.


This shall help me in updating my Audit Trail Fields and
Summarised totals also in header BLock.

Thks
Atul P

[Updated on: Fri, 30 December 2005 02:50]

Report message to a moderator

icon7.gif  Re: Data Committing problem (No Changes to Save) [message #153365 is a reply to message #153226] Sun, 01 January 2006 11:42 Go to previous messageGo to next message
gssunil
Messages: 7
Registered: January 2006
Location: Chicago
Junior Member

Hi

Try to change the record status by using code like

Set_Record_Property( 1, 'HEADER', STATUS, CHANGED_STATUS);


Please post if this worked for you.

Regards
Sunil
Re: Data Committing problem (No Changes to Save) [message #153390 is a reply to message #153226] Mon, 02 January 2006 00:24 Go to previous messageGo to next message
Atul P
Messages: 61
Registered: June 2003
Location: Mumbai-Jakarta
Member

Hi There

I have already done changing the record_status at runtime.
It works but it has problems.
When you query more than one record then while Navigating to next Record it will evertime prompt for
"Do you wish to save the Changes"

Ciao
Atul P
Re: Data Committing problem (No Changes to Save) [message #153471 is a reply to message #153390] Mon, 02 January 2006 13:24 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Almost there....

Put in your POST-BLOCK trigger the following code:
Set_Record_Property( 1, 'YOUR_BLOCK_NAME', STATUS, CHANGED_STATUS);

(for both blocks -HEADER and DETAILS- and ONLY in this trigger)


It will force an update everytime.

HTH,

Regards
R Zijlstra
Re: Data Committing problem (No Changes to Save) [message #153696 is a reply to message #153471] Tue, 03 January 2006 16:53 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You can also force a 'commit' by calling 'standard.commit'. This will ALWAYS 'save' your changes where 'commit' and 'commit_form' check to see if there has been a change in the form before doing anything.

David
Re: Data Committing problem (No Changes to Save) [message #160644 is a reply to message #153696] Mon, 27 February 2006 21:32 Go to previous messageGo to next message
Atul P
Messages: 61
Registered: June 2003
Location: Mumbai-Jakarta
Member

Hi David

The Standard.commit did not work for me.
Does it force commit at all given conditions or how.

Rgds
Atul P
Re: Data Committing problem (No Changes to Save) [message #160870 is a reply to message #160644] Tue, 28 February 2006 19:50 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
If the "standard.commit did not work for" you either the command was not executed (your logic is going somewhere else) or the items in which you are holding your data have not been defined as 'table fields'.

David
Re: Data Committing problem (No Changes to Save) [message #161140 is a reply to message #160870] Thu, 02 March 2006 04:07 Go to previous message
samidc
Messages: 35
Registered: February 2006
Member
Just do a simple thing.

Set "Synchronize or Copy" property your detail database items to this Control Items . Everything will work fine.

SaMiR.
Previous Topic: FRM-40102 record must be entered --- error
Next Topic: Regariding LOV
Goto Forum:
  


Current Time: Fri Sep 20 05:33:06 CDT 2024