Click here to Skip to main content
15,880,608 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Problems running the application on another computer Pin
dilkonika8-Jun-14 8:52
dilkonika8-Jun-14 8:52 
GeneralRe: Problems running the application on another computer Pin
dilkonika8-Jun-14 10:47
dilkonika8-Jun-14 10:47 
GeneralRe: Problems running the application on another computer Pin
Richard MacCutchan8-Jun-14 21:49
mveRichard MacCutchan8-Jun-14 21:49 
QuestionCopy Table from Word then Paste to Excel VB.net Pin
_XeLo_5-Jun-14 23:29
_XeLo_5-Jun-14 23:29 
AnswerRe: Copy Table from Word then Paste to Excel VB.net Pin
Chris Quinn6-Jun-14 0:22
Chris Quinn6-Jun-14 0:22 
GeneralRe: Copy Table from Word then Paste to Excel VB.net Pin
_XeLo_6-Jun-14 14:40
_XeLo_6-Jun-14 14:40 
Questioncopy to next available row Pin
David Rubin4-Jun-14 5:10
David Rubin4-Jun-14 5:10 
QuestionNeed Help to connect to MQ 7.0 using user id getting 2035 error. Pin
Member 102184182-Jun-14 21:03
Member 102184182-Jun-14 21:03 
As per our current set up we are not passing any user id to connect but due to security concerns now we need to pass user id to connect to queue manager.Code is written in VB6.I have set MQSERVER variable with manager name and port name. Rest all the details are passing through code.

Actually application is running under "uprabc" but "bagabc" is the user id which authorised to connect.
SO i passed "bagabc" as alternate user id but i am getting 2035 error and as per logs uprabc id is getting passed. Please help in understanding where i am making a mistake or any step i missed.


Below is the code(using CMQB library for connection):
VB
Private Function IBAAGMQConnect() As String

    Dim CompCode As Long      ' Completion code
    Dim Reason As Long        ' Reason code
    Dim od As MQOD            ' Object descriptor

    Dim CnoCD As MQCNOCD                                ' Connect Options for SSL
    Dim QMgrName As String * MQ_Q_MGR_NAME_LENGTH       ' Pass to MQCONN

    ' Connect to the Queue Manager
    QMgrName = QManagerName




    MQCONN QMgrName, gHcon, CompCode, Reason

    If CompCode <> MQCC_OK Then
        IBAAGMQConnect = "IBAAG MQ: Connection to Queue Manager failed. Reason: " & Reason & " Mgr Name is " & QMgrName
        Exit Function
    Else
        IBAAGMQConnect = "0000"
    End If

End Function



VB
Private Function IBAAGMQOpen(FQueueName As String) As String

    Dim CompCode As Long      ' Completion code
    Dim Reason As Long        ' Reason code
    Dim O_options As Long     ' Open options
    Dim od As MQOD            ' Object descriptor

    ' Open the queue specified in the Queue textbox
    ' if the connect was successful
    If gHcon Then

        MQOD_DEFAULTS od
        od.ObjectName = FQueueName

        ' To specify a queue manager uncomment the
        ' Following line which is (Case-Sensitive)
        od.ObjectQMgrName = QManagerName

        od.AlternateUserId = AlternateUsedId


        O_options = MQOO_OUTPUT + MQOO_INPUT_SHARED + MQOO_ALTERNATE_USER_AUTHORITY

        MQOPEN gHcon, od, O_options, gHobj, CompCode, Reason

        If CompCode <> MQCC_OK Then
            Select Case Reason
                Case Is = 2085
                    IBAAGMQOpen = "IBAAG MQ: Opening of " & Trim(FQueueName) & " failed. " & "ReasonCode = (2085) - MQRC_UNKNOWN_OBJECT_NAME: Check the spelling of the Queue name, which is Case-Sensitive."
                Case Is = 2087
                    IBAAGMQOpen = "IBAAG MQ: Opening of " & Trim(FQueueName) & " failed. " & "ReasonCode = (2087) - MQRC_REMOTE_Q_MGR: Check the spelling of the Queue name, which is Case-Sensitive."
            End Select
            Exit Function
        Else
            IBAAGMQOpen = "0000"
        End If
    Else
        IBAAGMQOpen = "IBAAG MQ: Opening of " & Trim(FQueueName) & " failed. " & Reason
    End If

End Function

QuestionUsing Functions across forms Pin
gwittlock1-Jun-14 16:34
gwittlock1-Jun-14 16:34 
AnswerRe: Using Functions across forms Pin
Peter Leow1-Jun-14 17:12
professionalPeter Leow1-Jun-14 17:12 
GeneralRe: Using Functions across forms Pin
gwittlock1-Jun-14 18:14
gwittlock1-Jun-14 18:14 
AnswerRe: Using Functions across forms Pin
Bernhard Hiller2-Jun-14 0:23
Bernhard Hiller2-Jun-14 0:23 
GeneralRe: Using Functions across forms Pin
gwittlock2-Jun-14 1:14
gwittlock2-Jun-14 1:14 
Questionlistview won't display data populated in vb6 Pin
Dave-1016953130-May-14 6:37
professionalDave-1016953130-May-14 6:37 
AnswerRe: listview won't display data populated in vb6 Pin
Tim Carmichael30-May-14 9:02
Tim Carmichael30-May-14 9:02 
GeneralRe: listview won't display data populated in vb6 Pin
Dave-1016953130-May-14 9:32
professionalDave-1016953130-May-14 9:32 
QuestionImport from SQL table by column Pin
Member 1066669830-May-14 4:38
Member 1066669830-May-14 4:38 
AnswerRe: Import from SQL table by column Pin
Eddy Vluggen30-May-14 10:43
professionalEddy Vluggen30-May-14 10:43 
AnswerRe: Import from SQL table by column Pin
Mycroft Holmes30-May-14 13:01
professionalMycroft Holmes30-May-14 13:01 
GeneralRe: Import from SQL table by column Pin
Member 106666981-Jun-14 22:40
Member 106666981-Jun-14 22:40 
GeneralRe: Import from SQL table by column Pin
Member 106666981-Jun-14 22:59
Member 106666981-Jun-14 22:59 
GeneralRe: Import from SQL table by column Pin
Mycroft Holmes2-Jun-14 0:53
professionalMycroft Holmes2-Jun-14 0:53 
GeneralRe: Import from SQL table by column Pin
Member 106666982-Jun-14 4:49
Member 106666982-Jun-14 4:49 
GeneralRe: Import from SQL table by column Pin
Eddy Vluggen2-Jun-14 8:23
professionalEddy Vluggen2-Jun-14 8:23 
GeneralRe: Import from SQL table by column Pin
Member 106666982-Jun-14 20:42
Member 106666982-Jun-14 20:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.