Is there anyone with experience using TOraChangeNotification? I'm having trouble getting it to work.
Here's what I am doing:
In the IDE, I placed this component on a form, wrote a simple ShowMessage line in the OnChange event and attached the component to a TOraQuery. In the form's OnShow event, I open an Oracle session and open the query. Then I run my app.
I then go to SQL Plus and update data in the table that the TOraQuery in my app has queried. I commit the change in SQL Plus. The OnChange event in my code never runs.
I'm using ODAC 6.50.0.39 against a 10g database.
Change Notification component
Maybe the following information can help:
To use the change notification functionality, the JOB_QUEUE_PROCESSES initialization parameter must be set to a none-zero value.
To use the change notification functionality, the JOB_QUEUE_PROCESSES initialization parameter must be set to a none-zero value.
Code: Select all
ALTER SYSTEM SET job_queue_processes=1The parameter is set to 1 and still no success.
Here are the relevant excerpts from the pas and dfm files (the db username and passwords have been removed).
Here are the relevant excerpts from the pas and dfm files (the db username and passwords have been removed).
procedure TForm1.FormShow(Sender: TObject);
begin
Session.Connect;
Qry.Open;
end;
procedure TForm1.OraChangeNotification1Change(Sender: TObject;
NotifyType: TChangeNotifyEventType; TableChanges: TNotifyTableChanges);
begin
ShowMessage('foo');
end;
object Session: TOraSession
Options.KeepDesignConnected = False
Server = 'ced'
Connected = True
LoginPrompt = False
Left = 32
Top = 88
end
object Qry: TOraQuery
Session = Session
SQL.Strings = (
'SELECT *'
' FROM accounts')
ChangeNotification = OraChangeNotification1
Active = True
Left = 128
Top = 88
end
object OraChangeNotification1: TOraChangeNotification
OnChange = OraChangeNotification1Change
Left = 224
Top = 88
end