Author |
Message
|
sumangeorge |
Posted: Mon Feb 27, 2017 6:43 am Post subject: How to fill MQServer varibales in VB6 |
|
|
Newbie
Joined: 26 Feb 2017 Posts: 2
|
We are moving IBM Websphere MQ to a different server(VB6 app will be in different server). I need to populate SET Server field. I am using MQAX200.DLL to connect to MQ.
Please let me know how can i connect to different server from vb6.
Below is the code we are currently using to connect to Queue Manager:
With MQAX200.MQQueueManager
'Set the Name of the Queue Manager (or allow to default)
.Name = Form1.strManagerQueueName
.ChannelAutoDefinition.ChannelName = "%CL.SELECTA.SELQMD1"
.ChannelAutoDefinition.ConnectionName = "selmqrhd11"
'Connect to Queue Manager
.Connect
'Get Connect Method Results & Display
mlngConnectionHandle = .ConnectionHandle
'Check Completion Code
If .CompletionCode <> MQCC_OK Then
Form1.txtstreamLog_File.WriteLine Date & " " & Time & " ERROR: Failed to connect to Queue Manager: " & Form1.strManagerQueueName & vbCr & _
"Reason Code: " & .ReasonCode & vbCr & _
"Reason Text: " & .ReasonName
ConnectQueueManager = False
Exit Function
End If
End With 'mconMQ |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 27, 2017 7:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Be aware:
- VB6 is well out of support
- the ActiveX technology you're using to connect to MQ is out of support
- if as part of this move of MQ is an upgrade of MQ version then either or both of the above points will cause failures
sumangeorge wrote: |
I need to populate SET Server field. |
No you don't. You're setting the connection properties in the ActiveX control, which will override the MQSERVER variable. Ensure the MQ construct you're pointing at (however that channel is defined) properly references the new queue manager and it's host name/DNS name/IP address. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 27, 2017 2:52 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And please upgrade your app to VB.NET  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Tue Feb 28, 2017 5:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
And please upgrade your app to VB.NET  |
Vitor wrote: |
VB6 is well out of support |
_________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Feb 28, 2017 6:26 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You don't set these properties in your code.
You set the relevant MQSERVER/MQCLNTCHL properties in the environment that your code runs under.
*IF* Vb6 lets you modify the environment variables inside your code, *then* you can set these in your code.
but again:
fjb_saper wrote: |
And please upgrade your app to VB.NET  |
Vitor wrote: |
VB6 is well out of support |
_________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|