Live update

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
 
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:
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;
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
 
Back
Top