Author |
Message
|
RogerLacroix |
Posted: Mon Jan 14, 2008 10:02 pm Post subject: VB AMQSCNXB sample |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
All,
Someone asked me to help them with a problem (RC=2058) with the IBM supplied AMQSCNXB Visual Basic sample. This sample shows how to do MQCONNX from VB.
I'm not a VB programmer but everything looks correct. It is compiled with "MSGTYPE=2" which means client mode.
I've double-checked the parameters and everything is ok but it always (immediately) returns a RC of 2058.
Is there another flag or environment variable to set to use the VB AMQSCNXB sample?
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jan 15, 2008 3:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
There's a GMQ_MQLIB or some such environment variable for the vb6/ActiveX components, that's similar to the NMQ_MQ_LIB variable for .NET.
It's worth a try. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jan 15, 2008 11:10 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
jefflowrey wrote: |
There's a GMQ_MQLIB or some such environment variable for the vb6/ActiveX components, that's similar to the NMQ_MQ_LIB variable for .NET. |
Nope. Same problem.
If I set GMQ_MQLIB along with MQCHLLIB & MQCHLTAB then the MQCONNX works like MQCONN and connects using the client channel table info. But that is not the point of the sample: it is to connect using MQCONNX via VB.
Any other thoughts.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jan 15, 2008 11:14 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I remember not being able to get this to work...but I was doing weird things with binding against MQAX200 and linking in from C++ Builder and etc...
That may not be helpful.
You could run mq client tracing, and see if it shows up as a valid client connection... ?
You could double-check to see if you're not improperly mixing Short and Long strings (plain and unicode)... And that the qmgr name is not space-padded or etc. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jan 15, 2008 11:22 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
We have not changed or altered the VB amqscnxb code.
I have set the GMQ_MQLIB environment variable globally - I even rebooted. (Also, I'm at WMQ v6.0.2.2.)
I start MS Visual Basic v6, open an existing project (amqscnxb.vbp), run it.
Shouldn't the IBM supplied VB sample work? Note: The amqscnxc (C version) works just fine.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jan 15, 2008 11:35 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes, the pre-supplied sample *should* work.
I haven't tried it, though.
The symptom does seem like it's failing to bind against the client libraries, and instead making a server connection.
But you should have that fixed now, with the MSGTYPE=2... Unless you need GMQ_MQLIB in the compiler tool environment, rather than the runtime environment...
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Sat Jan 26, 2008 11:37 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
All,
On a different WinXP PC, I installed just the WMQ Client v6.0.2.2 and VB v6 and built the IBM supplied VB AMQSCNXB sample. I still get the same result of RC equal to 2058. I tried setting the GMQ_MQLIB environment variable with the same result (RC=2058).
Does anybody have any idea how to get MQCONNX work from VB? (i.e. VB AMQSCNXB sample)
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|