This content has been marked as final. Show 3 replies
Have you exported the appropriate COM interface from your code? You may want to bump up to latest 8.1 version (8.1.7) as well. There was a bug in the callback code w/8.1.5, maybe fixed in 8.1.6, for sure fixed in 8.1.7.
Thanks for a prompt response. I guess this is part of the confusion. Is the callback client a COM object that I build or is it part of the Oracle set of objects? In addition, if I am creating an ActiveX dll, could it be part of that or does it have to be separate? Sorry if these questions seem simplistic. This is my first attempt with VB and AQ. Your help and advice is greatly appreciated.
You have to implement a COM interface in your application (or your own OLE object) that exposes the NotifyMe interface as described in the docs. You then use the MonitorStart method to have the object called asynchronously. If memory serves, the interface was:
and the LPDISPATCH pointer was a reference to an OraAQMsg object which contained the message payload.
Suppose you created your own COM object that exposed this interface and called it MyNotify. You then do something like this:
Dim MyQ as OraAQ
Dim Notifier as MyNotify
Dim DB as OraDatabase
Dim OraS as Object
. 'Connect to the RDBMS and init the session (code ommitted for brevity)
Set MyQ = DB.CreateAQ("TEST")
Set Notifier = new MyNotify
Then your object will have the NotifyMe method invoked as messages are dequeued.