ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » VB.NET and inquire

Post new topic  Reply to topic
 VB.NET and inquire « View previous topic :: View next topic » 
Author Message
kevinf2349
PostPosted: Fri Apr 02, 2004 11:44 am    Post subject: VB.NET and inquire Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Ok I give in.....I have been trying to work out how on earth to get a Qmgr.Inquire working in VB.NET. I am using the following:

Code:
        Dim selector As Integer()
        selector = New Integer() {1}
        Dim Attrs As Integer()
        Attrs = New Integer() {0}
        Dim cmdq As Byte()
        cmdq = New Byte() {1}

 
        selector(0) = MQC.MQCA_COMMAND_INPUT_Q_NAME

        Try
            qMgr.Inquire(selector, Attrs, cmdq)
        Catch ex As MQException
            Dim err As String = "Inquire for queue manager failed : " + ex.Message
            MsgBox("Error inquiring on queue manager : " & Qmgrname & vbCrLf & "Error is " & err, MsgBoxStyle.Critical, "INITQ Inquire Error")
            MsgBox("cmdq(0) = " & cmdq(0) & vbCrLf & "selector(0)= " & selector(0) & vbCrLf & "MQ reason Code=" & ex.reason)
            If LogFileCount = True Then
                outline = Now & vbTab & "***"
                Rlog.WriteLine(outline)
                outline = Now & vbTab & "Inquire failed for Qmgr (" & Qmgrname & "). Error is : " & ex.Message
                Rlog.WriteLine(outline)
                outline = Now & vbTab & "Please Contact System Programming"
                Rlog.WriteLine(outline)
                outline = Now & vbTab & "***"
                Rlog.WriteLine(outline)
                CloseLogFile()
            End If
            Return
        End Try


It is throwing an exception of MQRC_CHAR_ATTRS_TOO_SHORT (2008). I think I know why, but I can't increase the length. It looks like chrattrs is defined as BYTE in the class definition so I don't actually understand how to make it any bigger.

Any clues? All help appreciated.

btw this is my first VB.NET development with MQ so be gentle with me
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » VB.NET and inquire
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.