Author |
Message
|
cliao |
Posted: Wed Sep 08, 2004 12:03 pm Post subject: Access Queue in vb.net |
|
|
Novice
Joined: 08 Sep 2004 Posts: 23
|
I am trying to write a program in vb.net to connect to the queue, get some attributes of the queue, maybe get the messages from the queue if it's possible. However, when I was trying to use the sample code provided by installing the client, it didn't work. It tells me that the IBM.WMQ is not there. What do I need to do?
Thanks for your help.
Thanks,
Lei |
|
Back to top |
|
 |
vennela |
Posted: Wed Sep 08, 2004 12:11 pm Post subject: Re: Access Queue in vb.net |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
cliao wrote: |
I am trying to write a program in vb.net to connect to the queue, get some attributes of the queue, maybe get the messages from the queue if it's possible. However, when I was trying to use the sample code provided by installing the client, it didn't work. It tells me that the IBM.WMQ is not there. What do I need to do?
Thanks for your help.
Thanks,
Lei |
You said you have installed MQ Client?
Where is the MQServer installed then?
PS: Wrong forum. Post it in general section or MQSeries API forum |
|
Back to top |
|
 |
kirani |
Posted: Wed Sep 08, 2004 10:19 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Moved to API Support Forum. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
cliao |
Posted: Thu Sep 09, 2004 8:12 am Post subject: |
|
|
Novice
Joined: 08 Sep 2004 Posts: 23
|
the mq server is installed on another machine. but with the client installed on my machine, I am able to run the vb6 program to inquiry the queue. However, I would like to get it to work in vb.net. but the sample code for vb.net provided by the installation won't let me import it into a new project. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 09, 2004 9:09 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Did you register the .NET dll with the GAC? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
cliao |
Posted: Thu Sep 09, 2004 9:21 am Post subject: |
|
|
Novice
Joined: 08 Sep 2004 Posts: 23
|
I am sorry, where's the .net dll and GAC? I am new to this. Don't know too much about it. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 09, 2004 9:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
There is a document that should have been installed in your MQSeries client directory called csqzav01.pdf, that will cover the .NET interface and how to set it up and use it.
Except, apparently, it doesn't cover this particular task.
Well, either wait for JasonE to repost the instructions, or do a search here for 'gacutil'. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JasonE |
Posted: Thu Sep 09, 2004 11:26 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Hey, someone else might have posted them - it doesnt have to be me (I just seem to end up here a lot!)
From the memo.ptfs we ship with our fixpacks:
Quote: |
Installation
------------
Applications build with the 'WebSphere MQ Classes for .NET' assembly
(amqmdnet.dll) will cause the CLR to throw a 'FileNotFoundException'.
This is because the CLR can't find the assembly in the application.
To allow the CLR to find the assembly either:
Share the assembly by installing it in the 'global assembly cache'
(GAC).
The 'WebSphere MQ Classes for .NET' assembly is installed in the
GAC by executing the following command:
gacutil /i amqmdnet.dll
This will allow applications to find the assembly.
Alternatively a config file can be created to tell the CLR where to
find the 'WebSphere MQ Classes for .NET' assembly.
Example config file for nmqsget.exe (config file name is
application.exe.config - ie nmqsget.exe.config)
Code: |
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="amqmdnet" publicKeyToken="dd3cb1c9aae9ec97" culture="neutral" />
<codeBase version="1.0.0.3" href="file://c:\mqm\bin\amqmdnet.dll" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> |
|
|
|
Back to top |
|
 |
cliao |
Posted: Thu Sep 09, 2004 12:36 pm Post subject: |
|
|
Novice
Joined: 08 Sep 2004 Posts: 23
|
Thank you guys, I have the sample code working now in vb.net. thanks for you help. |
|
Back to top |
|
 |
|