IsTransactional
MSMQQueueInfo

Read-only. The IsTransactional property indicates whether or not the queue supports transactions.

Quick Info

Type: Boolean
Run time: read-only

Syntax

object.IsTransactional
 
Syntax Element Description
object Queue information (MSMQQueueInfo) object that defines the queue.

Return Values

TRUE
The queue is only used in transactions.
FALSE
The queue is not used in transactions.

Remarks

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.

Example

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
 

See Also

Create, FormatName, Label, MSMQMessage, MSMQQueueInfo, PathName, Peek, PeekNext, Receive, Refresh, Send


© 1997 by Microsoft Corporation. All rights reserved.