|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
VB Client Options |
« View previous topic :: View next topic » |
Author |
Message
|
ssagodi |
Posted: Fri Apr 12, 2002 12:29 pm Post subject: |
|
|
Newbie
Joined: 11 Apr 2002 Posts: 2
|
Does anybody have any advice on which style of programming to use when interfacing with MQSeries from VB. The samples provided for VB do not use the ActiveX library which would seem the logical choice.
Can anybody provide pro's/con's for the different options ??
We also need to make a decision on VB6 vs VB.Net. Does anybody have VB.Net working with MQ ??
Thanks for any replies
_________________ Steve Sagodi, IT Architect
IBM Global Services
Email: SAGODIS@CA.IBM.COM |
|
Back to top |
|
 |
MillsPerry |
Posted: Tue Apr 16, 2002 1:13 pm Post subject: |
|
|
 Acolyte
Joined: 08 Oct 2001 Posts: 59 Location: ZyQuest, inc.
|
I generally have found MQAX200 more convenient to work with than the older Win32 API. However in rare situations, such as building RFH2 headers, the older API seems more stable.
When you go to VB .NET, fixed length strings become a problem, so you will either have to use MQAX200 or else create a .NET version of cmqb.bas. I have not personally tried to pass a STRUCTURE to an API function, but it could get ugly since I don't believe that it uses contiguous memory. |
|
Back to top |
|
 |
dpchiesa |
Posted: Tue Jun 04, 2002 11:54 am Post subject: VB.Net and MQSeries |
|
|
 Apprentice
Joined: 29 May 2002 Posts: 46
|
I have VB.NET working with MQSeries in a simple sample.
Actually I just grabbed the vb6 sample project amqsailq.vbp and upgraded it with the upgrade wizard in Visual Studio .NET. It left a few open issues like the one described by Mills, but the workarounds were documented. In particular, you can set a VB.NET struct to be contiguous in memory via the use of an attribute on the struct, ie:
Code: |
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)> |
As I said, this is suggested in the comments added by the upgrade wizard. The effect after a bit of manual intervention was a .NET version of cmqb.bas (now named cmqb.vb).
The piece I got working was basic MQAI stuff - querying queue names and depth on local queues. I didn't run into any huge obstacles.
-Dino _________________ -dpchiesa |
|
Back to top |
|
 |
dpchiesa |
Posted: Thu Jun 06, 2002 12:19 pm Post subject: sample code |
|
|
 Apprentice
Joined: 29 May 2002 Posts: 46
|
http://hosting.msugs.ch/cheeso9/dl/amqsailq.NET.zip
This is the vb6 amqsailq vbp, upgraded to VB.NET using the Visual Studio .NET upgrade wizard, then augmented with some additional stuff (datagrid, addl q attributes).
you need VS.NET to run it, but you can view the source with any text editor.
-D _________________ -dpchiesa |
|
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
|
|
|
|