...I get 2035 errors. The server shows that I am passing ((None)) as the user (SID). The user on the MQ server is "rhorn". The HTS is the domain.
If I use...
Posted: Thu Dec 18, 2008 12:37 pm Post subject: Solved
Novice
Joined: 10 Dec 2008 Posts: 13
What I didn't know what that using Environment.UserName overrides the MQSERVER variable. So for MQ's that use the Windows user to log in, you simply do not use the .UserID and .Password settings at all as:
Code:
'Open a connection to the MQ Mgr.
MQEnvironment.Channel = lblMQChannel.Text
MQEnvironment.Hostname = lblMQHost.Text
MQEnvironment.Port = intPort
If (strQMgr = "XXXXX" And strLoc = "YYYYY") Then
'This overrides the MQSERVER var UserID
MQEnvironment.UserId = USER
MQEnvironment.Password = ""
End If
Where USER is a constant string (or passed in as a var if you wish) that contains the special user ID.
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