|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
VB 6.0 And MQClient Using MQAX200 |
« View previous topic :: View next topic » |
Author |
Message
|
vc1981 |
Posted: Thu Nov 23, 2006 12:41 am Post subject: VB 6.0 And MQClient Using MQAX200 |
|
|
Apprentice
Joined: 18 Jan 2006 Posts: 46
|
Hi ,
I have a piece of code written in VB6.0 which runs on a mq server 5.3 and is used to put and get messages or to get the queue depth of a particular queue on the same machine as that of the application ( making use of MQAX200 ) .
Now i need this to work with an MQ Client where by i would like to connect to a MQ Queue Manager which is there on another machine , i.e. my application would be connecting using server conn channels . I understnad that in MQAX200.dll i can make use of classes like
MQSession Class
MQQueueManager class
MQQueue class
MQMessage class
MQPutMessageOptions class
MQGetMessageOptions class
I made use of these in my code , but then in case of an server conn what sought of an object would that be ( i mean memeber of which class), any idea as to how this can be or any sort of docuemntation that you can guide me to would be really great !
Thanks _________________ Regards ,
VC |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 23, 2006 12:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Is this VB6 or .NET?
For both cases the Clients manual will give you full details, for the latter the .NET manual has more specific information. I suspect what you're looking for is the MQEnvironment class.
There's also code samples provided with the server install which may be of value. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
vc1981 |
Posted: Thu Nov 23, 2006 1:16 am Post subject: |
|
|
Apprentice
Joined: 18 Jan 2006 Posts: 46
|
I am not too good at VB so this might sound silly but then in my code when try to declare an object it doesn't prompt me for an class MQEnvironment , though it prompts me for other classes like ( MQQueue,MQQueueManager....etc .
Also i checked the link http://publibfp.boulder.ibm.com/epubs/html/csqzaf06/csqzaf06tfrm.htm
it says that
"You can link Visual Basic applications with the WebSphere MQ client code on Windows 3.1, Windows 95, Windows 98, and Windows NT. "
My application is on Windows XP . _________________ Regards ,
VC |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 23, 2006 2:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Again, is this VB6 or VB.NET?
I can confirm that both will support client connections, and under WinXP as well as the platforms you mention. All that's needed is to use the client libraries instead of the server libraries and define the client environment.
Now MQAX200 IIRC is the ActiveX interface. That's not too clever and does has some quirks (see http://www.mqseries.net/phpBB2/viewtopic.php?t=348&). What I would do if I was you (and remember I'm not!) is to use the standard libraries in VB6 or the native .NET support in VB.NET. Both are straightforward to set up as clients. If you want to stick with ActiveX, best course of action is to search the forum & see what other people have tripped over. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 23, 2006 6:00 am Post subject: Re: VB 6.0 And MQClient Using MQAX200 |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
vc1981 wrote: |
I have a piece of code written in VB6.0 |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kayou |
Posted: Tue Dec 12, 2006 1:35 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2006 Posts: 21
|
Hi vc1981,
I already did WMQ V6 development in VB6 ; and MQA2000 did the job. VB6 is not object-oriented and does not handle exception, of course ; but this is not MQ API limitation, but Microsoft VB6 limitation.
I will give you for each development step a couple of things you have to do and normally it will work.
1) Setting IDE (a Visual Studio with VB6 compiler).
In your IDE project you'll need to include cmqb.bas and cmqpsb.bas files. Those 2 files contain constant value definitions and MQX2000 dll functions encasulation.
2) Compilation option (MqType=1 or 2).
Depending if you'll run your application on client you'll set the conditional compilation macro MqType to 1 or 2.
- If MqType = 1 then the MQM.DLL will be used for runtime. Do that, if your application will run on the server machine and WMQ installed on that windows server.
- If MqType = 2 then MQIC32.DLL will be used for runtime. Do that if you want your application to run on windows client not having a WMQ server installed on it.
I could not telle you exactly where you can specify the MqType setting ; but I'm sure, there's a place in visual studio where you can put that setting.
3) Environment variable settings (MQSERVER, GMQ_MQ_LIB).
Client side :
SET MQSERVER=ChannelName/TransportType/ConnectionName
GMQ_MQ_LIB=<the_path_that_contains_the_dll>/MQIC32.DLL
Server side (I think it is not necessary to do environment variable settings on the server side, but normally it will be the stuff below).
SET MQSERVER=ChannelName/TransportType/ConnectionName
GMQ_MQ_LIB=<the_path_that_contains_the_dll>/MQM.DLL
The MQSERVER will tell your MQQueueManager class what queue managers are available on the connection port you specified in MQSERVER environment variable.
4) Last but not least (Samples).
In the MSI/Tools/VB of the client or server trial version of WMQ V6 you'll find VB6 samples and API files to be included in project.
Have fun. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|