Author |
Message
|
sebastia |
Posted: Mon Oct 08, 2007 9:01 pm Post subject: sample to connect using MQ Server from C# (sharp) |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
We need to connect from a machine that has MQ Client
to few remote sites, so we want to use AMQCLCHL.TAB
We are having problems (RC = 2059) from our code in "C#", c-sharp.
Can someone provide a pointer to a sample that shows
how to connect in this environment ?
(MQ client, C sharp, channel table)
The problem is C-sharp does not provide any info in the "Exception" ...
And we are not sure the Options to use ..
Now are trying "MANAGED_CLIENT" ...
Thanks. Seb. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 08, 2007 11:43 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
There's samples available on the install media and the usual places on the web. Seach the forum for "sample code" and you'll get the links.
You might also want to search for discussions on the managed client, of which there have been a few. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sebastia |
Posted: Mon Oct 08, 2007 11:54 pm Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 09, 2007 12:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I never said the samples had been updated recently.....
And they're only examples.
(For the record - MA7P is not missing, it's withdrawn) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sebastia |
Posted: Tue Oct 09, 2007 12:15 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 09, 2007 12:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
But why would you want to find it? The contents of the support pac are now base functionality (hence the withdrawal). Using the support pac is at best unnecessary and will at worst cause problems. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sebastia |
Posted: Tue Oct 09, 2007 12:55 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
I want it because here
>>> http://www.codeproject.com/csharp/csharpmq.asp
it says there are few samples ...
Do you mean there are C Sharp samples in an IBM base product ?
I will have a look, but ... I think there will be NOT ..
==========================
Literally it says : (which is what I want ...)
Examples of how to use the channel definitions are shown in the sample programs supplied with the .NET Support Pack. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 09, 2007 1:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
You have presumably found and discounted other sources of sample code, including (but not limited to) the excellent examples on the Capitalware site (thanks Roger!)? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sebastia |
Posted: Tue Oct 09, 2007 2:10 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
No, Vitor - Capitalware samples have not been found by us, yet ...
Any pointer to where to find them ?
Sebastian. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 09, 2007 2:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
|
Back to top |
|
 |
sebastia |
Posted: Tue Oct 09, 2007 2:37 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Thanks, Vitor - we shall spend some time there, yes ! |
|
Back to top |
|
 |
rlagares |
Posted: Wed Oct 10, 2007 7:59 am Post subject: Capitalware sample code |
|
|
Newbie
Joined: 09 Oct 2007 Posts: 7
|
Hello vitor,
I was checking the sample codes of capitalware, and I am using the same code, but I am using the amqmdnet.dll version 1.0.0.3, and my aplicattion is not running.
I readed something about two enviroment variables(MQCHLLIB & MQCHLTAB), and about the MQC.TRANSPORT_MQSERIES_CLIENT property from IBM.WMQ, but I don´t find any documentation about this.
Can someone tell me something about this?, Are these variables necesary?, is this property correctly?
Thanks |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 10, 2007 8:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rlagares wrote: |
I readed something about two enviroment variables(MQCHLLIB & MQCHLTAB), and about the MQC.TRANSPORT_MQSERIES_CLIENT property from IBM.WMQ, but I don´t find any documentation about this.
|
They're documented, quite obviously I think, in the Clients manual, and discussed extensively in the forum.
The property is discussed in the .NET manual (again obviously) and likewise discussed. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sebastia |
Posted: Wed Oct 10, 2007 3:48 pm Post subject: C# sample that uses MQCONNX() - we have to use MQCONN()+CCDT |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Good nite !
Can someone tell me ...
( obviously I am quite new to C# )
where in this code is the indication to use MQCONNX() ???
I can improve the question a bit :
WHAT SHALL I CHANGE TO USE MQCONN() and AMQCLCHL.TAB ?
Seb, still learning !
=============================================
Hashtable connectionProperties = new Hashtable();
String connectionType = MQC.TRANSPORT_MQSERIES_CLIENT;
// Add the connection type
connectionProperties.Add(MQC.TRANSPORT_PROPERTY, connectionType);
connectionProperties.Add(MQC.HOST_NAME_PROPERTY, " ");
connectionProperties.Add(MQC.CHANNEL_PROPERTY, " ");
// Set up the rest of the connection properties, based on the
// connection type requested
_oQueueManager = new MQQueueManager(" ", connectionProperties);
============================================= |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 10, 2007 10:57 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
The .NET manual didn't help then? Not even the part titled "Defining which connection type to use"?
May I respectfully suggest that, as a newcommer to C#, you get your feet wet (or wetter) with the language before attempting to navigate an admittedly not straightforward interface?
This forum's not the ideal place or method for training. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|