Home » Developer & Programmer » Forms » Execute Record after 10 Second (Developer 6I Database 10g Window XP)
Execute Record after 10 Second [message #405859] Sat, 30 May 2009 08:45 Go to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Hellow


I want to execute record after 10 Second for example if we my check box checked then every 10 Second my module will execute all record


Is there is any way?


Regards


Shahzaib Ismail
Re: Execute Record after 10 Second [message #405864 is a reply to message #405859] Sat, 30 May 2009 11:09 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member

Hope a Timer will do your work.
Re: Execute Record after 10 Second [message #405918 is a reply to message #405859] Sun, 31 May 2009 15:37 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How do you "execute a record"? Where and why would you use it?
Re: Execute Record after 10 Second [message #405936 is a reply to message #405918] Mon, 01 June 2009 00:48 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

What do u mean by execute a record
Re: Execute Record after 10 Second [message #405937 is a reply to message #405864] Mon, 01 June 2009 00:49 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

hi klat can u look into my issue on insert of records based on click of check boxes
Re: Execute Record after 10 Second [message #405941 is a reply to message #405937] Mon, 01 June 2009 01:18 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
I think Shahzaib wants to refresh (may be he means execute_query) the forms multirecord block for every 10 secs,
when the checkbox is checked.

By
Vamsi
Re: Execute Record after 10 Second [message #405951 is a reply to message #405859] Mon, 01 June 2009 02:00 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Thanks for all of your guys for reply


Actually i mean to execute those record which emp_no between 1 to 500

so after 10 second its will refresh all record and find new record if new record where insert or delete

Vasmi you are absolutely right i mean refresh my record


Shahzaib Ismail
Re: Execute Record after 10 Second [message #405954 is a reply to message #405859] Mon, 01 June 2009 02:17 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
I think i want to give you guys more information about what i need

I have a table which is
CREATE TABLE d_dispatch (
  tra                 NUMBER(10),
  d_dispatch_date     DATE,
  challan_no          NUMBER(10),
  d_dispatch_style_no VARCHAR2(15),
  dispatch_color_code NUMBER(10),
  dispatch_color_name VARCHAR2(10),
  dispatch_party_code NUMBER(10),
  dispatch_party_name VARCHAR2(40),
  size_1              NUMBER(10),
  size_2              NUMBER(10),
  size_3              NUMBER(10),
  size_4              NUMBER(10),
  size_5              NUMBER(10),
  size_6              NUMBER(10),
  size_7              NUMBER(10),
  size_8              NUMBER(10),
  dispatch_quantity   NUMBER(10),
  comments            VARCHAR2(50),
  dispatch            VARCHAR2(3),
  packed              VARCHAR2(3),
  CONSTRAINT fk_d_dispatch_style_no FOREIGN KEY ( d_dispatch_style_no ) references d_style(d_style_no),
  CONSTRAINT fk_dispatch_color FOREIGN KEY ( dispatch_color_name ) references d_color(color_name),
  CONSTRAINT fk_party_code_dispatch FOREIGN KEY ( dispatch_party_name ) references d_party(party_name)) 


I Show this table in my block with where clause

Where Dispatch='NO'

Now this block will show all my record which dispatch=No i create one button and write the trigger

:DISPATCH:='YES';
COMMIT;


now i need when i press my button its will wait 10 Second after 10 Second its will execute my all record which Dispatch='NO'

So those record which dispatch='Yes' (Which button i press) will automatically not show at this block


Hope i will clear my Question


Regards

Shahzaib Ismail
Re: Execute Record after 10 Second [message #405955 is a reply to message #405954] Mon, 01 June 2009 02:26 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't think that waiting 10 seconds is a good idea. User will keep on pressing this button, setting "dispatch = yes" for some records and 10 seconds later screen will keep on flushing (executing a query) and changing situation in front of confused user's eyes.

How about executing a query immediately? Modify the trigger so that it looks like this:
:DISPATCH:='YES';
COMMIT;
EXECUTE_QUERY;
It would refresh the screen right now. Unfortunately, if block contains many records, requires certain calculations etc., fetch might take a while.
Re: Execute Record after 10 Second [message #405957 is a reply to message #405859] Mon, 01 June 2009 02:58 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
This is a good idea


But unfortunately i don't need to execute after the pressing of button its just because i need to give time to user to modify if They press button by mistake

For example

if some one press button and then they realized they will press another button which is

:DISPATCH:='NO';
COMMIT;



And i create a Refresh button which is Execute_query

Why i need 10 Second to execute ?

I need a text_item which user define to enter how much second they need to execute record

For example please look at the picture


In this picture when i check box checked then user define the refresh Second

I hope you understand


Regards

Shahzaib Ismail
  • Attachment: list.jpg
    (Size: 76.16KB, Downloaded 566 times)
Re: Execute Record after 10 Second [message #405962 is a reply to message #405957] Mon, 01 June 2009 03:13 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I still think that time frame isn't the best idea. What if user needs 12 seconds? Will he/she know it? Sometimes, probably.

So, what you might do is omit committing within the trigger. Let user modify value of the "dispatch" item, back and forth from "yes" to "no", round and round. Though, code you've written doesn't enable that - you can only set "dispatch" to "no". Perhaps you should enable toggling its value, something like
if :dispatch = 'no' then
   :dispatch := 'yes';
elsif :dispatch = 'yes' then
   :dispatch := 'no';
end if;
(it could be rewritten in some other manner, but I guess you got the idea).

Once it is done, let him/her manually COMMIT and then, within that action (will it be a push button or KEY-COMMIT trigger), execute a query.

So: your "current" trigger would be just
:DISPATCH:='NO';
"Save changes" button (WHEN-BUTTON-PRESSED) or simply KEY-COMMIT trigger would then be
commit;
execute_query;
Re: Execute Record after 10 Second [message #405964 is a reply to message #405859] Mon, 01 June 2009 03:22 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Ok

I agree with you


Any way i have another button which will highlight current record

which trigger is
set_item_instance_property('challan_no',current_record,visual_attribute,'BL');
set_item_instance_property('dispatch_date',current_record,visual_attribute,'BL');
set_item_instance_property('style_no',current_record,visual_attribute,'BL');
set_item_instance_property('dispatch_party_name',current_record,visual_attribute,'BL');
set_item_instance_property('d_dispatch_quantity',current_record,visual_attribute,'BL');



but i want to Dis select highlight if i click any other item or any other button

The picture will clear you my point

Regards


Shahzaib ismail
  • Attachment: sa.bmp
    (Size: 937.06KB, Downloaded 758 times)
Re: Execute Record after 10 Second [message #405966 is a reply to message #405964] Mon, 01 June 2009 03:28 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Don't use a button to highlight a record - use PRE-RECORD to highlight it and POST-RECORD to remove highlighting.
Re: Execute Record after 10 Second [message #405968 is a reply to message #405859] Mon, 01 June 2009 03:33 Go to previous message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Thanks its work

Do you please help me if you know any thing about this question

http://www.orafaq.com/forum/t/145868/135627/


Regards

Shahzaib Ismail
Previous Topic: email with checkboxes
Next Topic: Change Column width by user ? in Run time ? like Excel
Goto Forum:
  


Current Time: Mon Feb 10 03:50:09 CST 2025