Author |
Message
|
nik_iway |
Posted: Mon Mar 27, 2006 5:41 am Post subject: VB API support |
|
|
Centurion
Joined: 21 Jul 2005 Posts: 115
|
Hi ,
I developed .DLL to connect to the MQServer, While Connecting i am getting 2059 errro (Queue Manager Not Found) and MQM.DLL file not found. and when i tried to register mqm.dll the specified module could not be found.
Can any body help me how to connect to MQServer using my VB API..
Wat the other configurations that needs to be done..
The MQ Admin has installed MQ 5.3 on Windows 2000 Server , with no network prerequisites.
I am using the VB API to connect to MQserver. Will that be an issue....
Waiting for your reply
Regards
nik |
|
Back to top |
|
 |
kevinf2349 |
Posted: Mon Mar 27, 2006 6:04 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Quote: |
I developed .DLL to connect to the MQServer, |
Why? Isn't the IBM provided one working for you for some reason?
Are you using .Net or just plain old VB6? |
|
Back to top |
|
 |
nik_iway |
Posted: Mon Mar 27, 2006 8:45 pm Post subject: |
|
|
Centurion
Joined: 21 Jul 2005 Posts: 115
|
Hi,
we are using IBM MQ API Only (mqm.dll), We are unable to register, for registration is there any prior configuration that needs to be done..
Waiting for Reply
Regards
Nik |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 28, 2006 12:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I use VB6.0 for small, often disposable MQ applications (MQ5.2/3, Win2K/XP) & have never bothered registering the DLL because it works fine without! The only configuration I recall doing is installing the various software, which would have been in the order Windows/MQ/VB.
Works a treat (just given it a brief spin) both as a client and with server side code. Are you certain about your connection information (wondering if the dll not found is a symptom of the 2059)?
Or it could just be another example of the rock solid environment that is Windows.....!  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mvic |
Posted: Tue Mar 28, 2006 12:59 am Post subject: Re: VB API support |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
nik_iway wrote: |
Can any body help me how to connect to MQServer using my VB API |
I see quite a few samples in Tools\VB\sampVB6 ... do any of these help? |
|
Back to top |
|
 |
nik_iway |
Posted: Tue Mar 28, 2006 1:38 am Post subject: |
|
|
Centurion
Joined: 21 Jul 2005 Posts: 115
|
Hi,
I am using the sample supplied by the IBM, the program used is
amqsputb.vbp. I am changing the MQCONN to MQCONNX.
Code is below:
MQCONNX "TEST", cOpts, gHcon, CompCode, Reason
In java i was using :
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES_CLIENT);
MQEnvironment.userID = "mq";
MQEnvironment.password = "123";
MQEnvironment.hostname = "11.102.31.36";
MQEnvironment.port = 1414;
MQEnvironment.channel= "CHAN1";
MQQueueManager qMgr1 = new MQQueueManager("TEST");
How to set the above properties in VB6
Help required urgently
Regards
Nik
(VB newbie) |
|
Back to top |
|
 |
zpat |
Posted: Tue Mar 28, 2006 1:49 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
If your application does not run on the same system as the MQ queue manager, then you need the MQ client installed on the system where it does run. |
|
Back to top |
|
 |
nik_iway |
Posted: Tue Mar 28, 2006 2:01 am Post subject: |
|
|
Centurion
Joined: 21 Jul 2005 Posts: 115
|
Hi Zpat,
I installed MQ Client on the System and also set the MQ Environment Variable
Variable Name : MQSERVER
Value : CHAN1/TCP/11.102.31.36(1414)
Is there any other configuration that needs to be done
Regards
Nik |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 28, 2006 2:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
What connection options are you setting (or why are you using MQCONNX rather than MQCONN if you have MQSERVER set)? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
nik_iway |
Posted: Tue Mar 28, 2006 3:12 am Post subject: |
|
|
Centurion
Joined: 21 Jul 2005 Posts: 115
|
Hi,
I am Using IBM ActiveX classes .
I am getting an error 2035 MQRC_NOT_AUTHORIZED.
Wat setting do i need to do in the Server as well as Client Machine
Help needed
Regards
Nik |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 28, 2006 3:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I thought you were getting a 2059? Have you now resolved the dll issues and achieved connection? If so, what was the problem (just out of curiosity)?
2035 is exactly what it says it is - an authorization failure. The common problems are:
1) The user you're running as doesn't have the authorisations you think they do;
2) You're not running as the user you think you are.
There's a wealth of information both here and in the documentation on how to check and resolve both of these situations. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
nik_iway |
Posted: Tue Mar 28, 2006 11:03 pm Post subject: |
|
|
Centurion
Joined: 21 Jul 2005 Posts: 115
|
Hi Victor,
I am using VB API to connect to MQSERVER on Windows 2000 Server. I copied the MQIC32.dll into the execution directory but i am able to register it. Wat r the neccessary .DLL and files required for the VB API to connect to MQServer.
Regards
Nik |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Mar 28, 2006 11:05 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can not copy mqm.dll or mqic32.dll and get MQ to function.
MQ requires the entire client installation or the entire server installation in order to function. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mvic |
Posted: Tue Mar 28, 2006 11:11 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
nik_iway wrote: |
I copied the MQIC32.dll into the execution directory but i am able to register it. |
There is no need to copy the MQ DLLs. Just add the directory containing the MQ DLLs to the PATH in use by your app.
There is no need to "register" the MQ DLLs. They don't offer COM interfaces; they are regular Win32 DLLs.
Quote: |
Wat r the neccessary .DLL and files required for the VB API to connect to MQServer. |
If you're connecting over TCP/IP (ie. client-bound app) then it's MQIC32.DLL. Please check out the comments at the top of Tools\VB\include\cmqb.bas ; you will need to set MqType appropriately.
Last edited by mvic on Tue Mar 28, 2006 11:13 pm; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 28, 2006 11:12 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Hi Nik,
I can only echo jefflowrey - your code will need a proper MQ install, either client or server, before you're going to get anywhere. Even though they are packaged as ActiveX. Trying to pick single dlls will not work, and given the small footprint of the client is more effort than it's worth.
Even if it was going to work!  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|