Print Thread
Live update
#57 09/15/99 06:47 PM
Joined: Sep 1999
Posts: 2
Sundsvall, Sweden
J
Member
OP Offline
Member
J
Joined: Sep 1999
Posts: 2
Sundsvall, Sweden
What is the best way (if it is possible) to have a grid with items from a table automatically updated if a new item comes in?



------------------
Johan Lindgren
johan.lindgren@tt.se


Johan Lindgren
johan.lindgren@tt.se
Re: Live update
#58 09/18/99 06:28 PM
Joined: Aug 1999
Posts: 22,214
Member
Offline
Member
Joined: Aug 1999
Posts: 22,214
In a multi-user application you can signal database events to multiple users by using the dbms_alert package. Let's assume you want to signal a user when a record is inserted into the dept table. In that case you can create a before insert trigger like this:
[quote]
Code
create or replace trigger dept_ins_trigger
  after insert on dept  
begin
  dbms_alert.signal('dept_insert', dbms_session.unique_session_id);
end dept_ins_trigger;
[/quote]
In this case you are merely signaling that one or more dept records have been inserted. In your application you can easily use a TOracleEvent to take some action when this happens. You can show a message, refresh the dataset, or whatever you consider appropriate. You may additionally need to make sure that the event isn


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.032s Queries: 14 (0.009s) Memory: 2.4969 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-05-10 04:32:01 UTC
Valid HTML 5 and Valid CSS