Author |
Message
|
rajagopalan |
Posted: Fri May 26, 2006 3:47 am Post subject: Problem in putting mesages in the Remote Q with VB Code |
|
|
Newbie
Joined: 14 May 2006 Posts: 1
|
Dear Gurus,
Iam facing a strange type of error in my Application while accessing my Queue Manager, i.e when my application try to put the messages in the remote queue definiton of my Queue Manager it throws the following error.
MQAX200.MQQueueManager::AccessQueue CompletionCode = 2, ReasonCode = 2045, ReasonName = MQRC_OPTION_NOT_VALID_FOR_TYPE
However i am able to put the message in the local queue of the Queue Manager.
Iam using VB application.
Mqseries 5.3 for windows CSD1 has been installed in my MQserver and the MQclient where my VB application is running is being installed with MQseries Client 5.3.
Please find enclosed the piece of code what iam using in the application code.
Public Sub PutMQString(ByVal str As String)
Dim MQPutMessageOptions As MQAX200.MQPutMessageOptions
Dim MQMessage As MQAX200.MQMessage
On Error GoTo ErrorPlace
Err.Clear
Set MQPutMessageOptions = gMQSession.AccessPutMessageOptions()
With MQPutMessageOptions
.Options = MQPMO_NO_SYNCPOINT
End With
Set MQMessage = gMQSession.AccessMessage()
gMQSession.ExceptionThreshold = 3
With MQMessage
.CharacterSet = MQCCSI_Q_MGR
.Format = "MQSTR"
.WriteInt2 Len(str)
.WriteString str
End With
Debug.Print str
gMQQueue.Put MQMessage, MQPutMessageOptions
Select Case gMQSession.ReasonCode
Case MQRC_NONE
Case Else
Call ShowMessage(gMQSession.ReasonName)
End Select
Set MQPutMessageOptions = Nothing
Exit Sub.
Suggest me to solve this issue
Venkat |
|
Back to top |
|
 |
kevinf2349 |
Posted: Fri May 26, 2006 5:19 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Just a couple of things....
First MQ 5.3 CSD01 is pretty old and I know there was issues with .Net in CSD's prior to CSD7. Personally I would put CSD12 on as soon as possible.
Next is that we would need to see the Object descriptor used for the Open as the usual cause for a 2045 is a screw up with the open options. |
|
Back to top |
|
 |
wschutz |
Posted: Fri May 26, 2006 5:52 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
I'd bet he's opening the queue for INPUT was well as output which works for local queues but fails for qremotes....  _________________ -wayne |
|
Back to top |
|
 |
tleichen |
Posted: Fri May 26, 2006 12:24 pm Post subject: Re: Problem in putting mesages in the Remote Q with VB Code |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
rajagopalan wrote: |
Iam facing a strange type of error in my Application while accessing my Queue Manager, i.e when my application try to put the messages in the remote queue definiton of my Queue Manager it throws the following error.
MQAX200.MQQueueManager::AccessQueue CompletionCode = 2, ReasonCode = 2045, ReasonName = MQRC_OPTION_NOT_VALID_FOR_TYPE
However i am able to put the message in the local queue of the Queue Manager.
|
I don't think MQPMO_NO_SYNCPOINT is valid for a remote queue.  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri May 26, 2006 12:28 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Sure it is. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
mvic |
Posted: Fri May 26, 2006 12:38 pm Post subject: Re: Problem in putting mesages in the Remote Q with VB Code |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
rajagopalan wrote: |
MQAX200.MQQueueManager::AccessQueue CompletionCode = 2, ReasonCode = 2045 |
Please post the code that calls MQAX200.MQQueueManager::AccessQueue(). As wschutz says, it is highly likely that an MQOO_INPUT_* option is being specified. |
|
Back to top |
|
 |
tleichen |
Posted: Fri May 26, 2006 12:54 pm Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
PeterPotkay wrote: |
Sure it is. |
Oh, that's right it's some of the open options that are not valid for remote queues, like :
MQOO_INPUT_AS_Q_DEF
MQOO_INPUT_SHARED
MQOO_INPUT_EXCLUSIVE
MQOO_BROWSE
MQOO_INQUIRE
MQOO_SET _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
|