Home » Developer & Programmer » Forms » update button
update button [message #120326] Thu, 19 May 2005 03:08 Go to next message
jonmich005
Messages: 53
Registered: April 2005
Member
Hello

I have a problem with my update button. I have code behind this button and if I run my form and I press the button it works just fine.
But if I adjust something then and I press it again it doesn't work.
But if I go to another form first and then back to the form with this button it works again.

So my problem is that it justs works fine only the first time I press the button when I enter my form.
So if I have forgotten to adjust something and I do it agian it doesn't work.

I hope that someone can help me.

Greetings jonas
Re: update button [message #120328 is a reply to message #120326] Thu, 19 May 2005 03:12 Go to previous messageGo to next message
icemelid
Messages: 15
Registered: April 2005
Location: BARCELONA
Junior Member

Dear Sir

Could you post your form herein, and if possible
the database info as well, so we can test and see
what may be going on ?

Thanks
Re: update button [message #120333 is a reply to message #120326] Thu, 19 May 2005 03:28 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
If you are using a non-database block to hold your fields, and the update button uses 'commit', it is possible that the form does not think that you have anything to save when you press the button a second time.

I could rant on about using blocks based on tables versus using non-database blocks, but I won't.

Change the 'commit' to 'standard.commit'. The latter is an unconditional commit.

Alternatively give us a bit more information.

David
Re: update button [message #120829 is a reply to message #120333] Tue, 24 May 2005 02:40 Go to previous messageGo to next message
jonmich005
Messages: 53
Registered: April 2005
Member
I have tried to change it into standard.commit, but it does still the same.
I really don't know what there might be wrong.
I have tried several things.
What more explanation do you need?
Re: update button [message #120851 is a reply to message #120326] Tue, 24 May 2005 05:10 Go to previous messageGo to next message
A Ikramur Rahman
Messages: 81
Registered: May 2004
Member
your update button is doing what? Please mention that.

Put debugging messages in your update button's WBP trigger (from beginning to end) and see where it is failing.

Re: update button [message #120853 is a reply to message #120851] Tue, 24 May 2005 05:15 Go to previous messageGo to next message
jonmich005
Messages: 53
Registered: April 2005
Member
I have made something likea grid and it has to update the data in the grid.
But if I push 1time on my update button it works.
But if I have forgotten to adjust a field the first time and I change it after I pushed the update-button, and I push it a second time, it doesn't work.
How can I put debugging messages in my trigger?
Re: update button [message #120855 is a reply to message #120326] Tue, 24 May 2005 05:31 Go to previous messageGo to next message
A Ikramur Rahman
Messages: 81
Registered: May 2004
Member
In the WBP Trigger,

BEGIN
MESSAGE('1');
MESSAGE(' ',NO_ACKNOWLEDGE);
few lines of your code
MESSAGE('2');
MESSAGE(' ',NO_ACKNOWLEDGE);
few lines of your code
MESSAGE('3');
MESSAGE(' ',NO_ACKNOWLEDGE);
few lines of your code
MESSAGE('4');
MESSAGE(' ',NO_ACKNOWLEDGE);
END;


Re: update button [message #120857 is a reply to message #120855] Tue, 24 May 2005 05:35 Go to previous messageGo to next message
jonmich005
Messages: 53
Registered: April 2005
Member
I have done this and this and teh result is with the counting of my columns.
The first time it counts every column but the second time just the first one.
this is the code for counting this:

:global.intervals :=1;
go_block('interval');
while not :interval.tl_int is null loop
:global.intervals := :global.intervals+1;
next_record;
end loop;
Re: update button [message #120858 is a reply to message #120326] Tue, 24 May 2005 05:38 Go to previous messageGo to next message
A Ikramur Rahman
Messages: 81
Registered: May 2004
Member
global.intervals :=1;
go_block('interval');
first_record;
while not :interval.tl_int is null loop
:global.intervals := :global.intervals+1;
next_record;
end loop;
Re: update button [message #120859 is a reply to message #120858] Tue, 24 May 2005 05:42 Go to previous messageGo to next message
jonmich005
Messages: 53
Registered: April 2005
Member
Thank you very very much this works great.


Thank you
Re: update button [message #120890 is a reply to message #120858] Tue, 24 May 2005 08:50 Go to previous messageGo to next message
jonmich005
Messages: 53
Registered: April 2005
Member
Do you perhaps know something about reports?
Re: update button [message #120906 is a reply to message #120326] Tue, 24 May 2005 10:40 Go to previous message
Steve Corey
Messages: 336
Registered: February 2005
Location: RI
Senior Member
Check out the Reports forum. Cool

Dependant on your question, I may be able to help you.

Steve
Previous Topic: process bar
Next Topic: Behaviour of text items in a form having customised menu in forms 6i
Goto Forum:
  


Current Time: Thu Sep 19 18:55:15 CDT 2024