Posted By: Johan Lindgren Live update - 09/15/99 06:47 PM
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
Posted By: Marco Kalter Re: Live update - 09/18/99 06:28 PM
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
© Allround Automations forums