Read-only. The IsTransactional property indicates whether or not the queue supports transactions.
Type: | Boolean |
Run time: | read-only |
object.IsTransactional
Syntax Element | Description |
object | Queue information (MSMQQueueInfo) object that defines the queue. |
To specify a queue as a transaction queue, see Create.
If a queue is transactional, it can only accept messages that are sent as part of a transaction (see the MSMQMessage object's Send method). In a similar way, messages read from a transactional queue must also be done as part of a transaction (see the MSMQQueue object's Peek, PeekNext, PeekCurrent, Receive, or ReceiveCurrent methods).
For information on transactions, see MSMQ Transactions.
This example creates a transactional private queue on the local machine, then uses the queue's IsTransactional property to display the appropriate message. To try this example using Microsoft Visual Basic (version 5.0), paste the code into the Code window of a form, and then run the example and click the form.
Dim qinfo As MSMQQueueInfo Private Sub Form_Click() Set qinfo = New MSMQQueueInfo qinfo.PathName = ".\PRIVATE$\isTransactionTest" qinfo.Label = "Test Queue" qinfo.Create IsTransactional:=True 'Creates transactional queue. qinfo.Refresh MsgBox "The queue's format name is: " + qinfo.FormatName If qinfo.IsTransactional Then MsgBox "The queue is a transactional queue." Else MsgBox "The queue is not a transactional queue." End If End Sub
Create, FormatName, Label, MSMQMessage, MSMQQueueInfo, PathName, Peek, PeekNext, Receive, Refresh, Send