ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » VB Client Options

Post new topic  Reply to topic
 VB Client Options « View previous topic :: View next topic » 
Author Message
ssagodi
PostPosted: Fri Apr 12, 2002 12:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
MillsPerry
PostPosted: Tue Apr 16, 2002 1:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
dpchiesa
PostPosted: Tue Jun 04, 2002 11:54 am    Post subject: VB.Net and MQSeries Reply with quote

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
View user's profile Send private message
dpchiesa
PostPosted: Thu Jun 06, 2002 12:19 pm    Post subject: sample code Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » VB Client Options
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.