IsTransactional
MSMQQueueInfo

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

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 method).

For information on transactions, see MSMQ Transactions.

Example

This example creates a transactional private queue on the local computer, and 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, 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
 

QuickInfo

  Windows NT: Requires version 4.0 SP3 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in mqoai.h.
  Import Library: Use mqoa.lib.
  Unicode: Defined only as Unicode.

See Also

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