Oracle Objects for OLE
Release 9.2

Part Number A95895-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

Example: Dequeuing Messages

Dequeuing messages of RAW type

'Dequeue the first message available

Q.Dequeue()

Set Msg = Q.QMsg

'Display the message content

MsgBox Msg.Value

'Dequeue the first message available without removing it

' from the queue

Q.DequeueMode = ORAAQ_DEQ_BROWSE

'Dequeue the first message with the correlation identifier

' equal to "RELATIVE_MSG_ID"

Q.Navigation = ORAAQ_DQ_FIRST_MSG

Q.correlate = "RELATIVE_MESSAGE_ID"

Q.Dequeue

'Dequeue the next message with the correlation identifier

' of "RELATIVE_MSG_ID"

Q.Navigation = ORAAQ_DQ_NEXT_MSG

Q.Dequeue()

'Dequeue the first high priority message

Msg.Priority = ORAQMSG_HIGH_PRIORITY

Q.Dequeue()

'Dequeue the message enqueued with message id of Msgid_1

Q.DequeueMsgid = Msgid_1

Q.Dequeue()

'Dequeue the message meant for the consumer "ANDY"

Q.consumer = "ANDY"

Q.Dequeue()

'Return immediately if there is no message on the queue

Q.wait = ORAAQ_DQ_NOWAIT

Q.Dequeue()

Dequeuing messages of Oracle object types

Set OraObj = DB.CreateOraObject("MESSAGE_TYPE")

Set QMsg = Q.AQMsg(1, "MESSAGE_TYPE","SCOTT")

'Dequeue the first message available without removing it

Q.Dequeue()

OraObj = QMsg.Value

'Display the subject and data

MsgBox OraObj("subject").Value & OraObj("Data").Value


 
Oracle
Copyright © 1994, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback