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 » sample for browsing message in vb.net

Post new topic  Reply to topic
 sample for browsing message in vb.net « View previous topic :: View next topic » 
Author Message
cliao
PostPosted: Wed Oct 06, 2004 6:04 am    Post subject: sample for browsing message in vb.net Reply with quote

Novice

Joined: 08 Sep 2004
Posts: 23

Can someone give me an example on how to browsing message in vb.net?

thanks,
Lei
Back to top
View user's profile Send private message
vennela
PostPosted: Wed Oct 06, 2004 8:30 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

I don't know any VB. But if you have installed MQ or MQ client then there will be sample programs in the directory
<MQ Install Directory>\Tools\VB\SampVB6

For me it is
C:\Program Files\IBM\WebSphere MQ\Tools\Vb\sampVB6

The program you should be looking at starts with amqsbcg

I don't know the which one of them is source code but I have these files

Code:

amqsbcgb.frm
amqsbcgb.frx
amqsbcgb.vbp
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JasonE
PostPosted: Wed Oct 06, 2004 8:37 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

There isnt any .net *bcg equivalents shipped (\mqm\Tools\dotnet\samples\vb)

VB is not equal to vb.net
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Wed Oct 06, 2004 9:47 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Take a look in

C:\Program Files\IBM\WebSphere MQ\Tools\VB\sampVB6\pcfsamp.NET

That gives some PCF command examples but you should be able to work it out from there.

If that doesn't give you any help try manual WebSphere MQ Using .Net (GC34-6328-02) it gives some examples for you.
Back to top
View user's profile Send private message
cliao
PostPosted: Wed Oct 06, 2004 10:41 am    Post subject: Reply with quote

Novice

Joined: 08 Sep 2004
Posts: 23

This is what I have,

objQueue = objQMgr.AccessQueue(strQname, MQC.MQOO_BROWSE + MQC.MQOO_FAIL_IF_QUIESCING)

Dim mqMsg As MQMessage '* MQMessage instance
Dim mqGetMsgOpts As MQGetMessageOptions '* MQGetMessageOptions instance

mqMsg = New MQMessage
mqGetMsgOpts = New MQGetMessageOptions
mqGetMsgOpts.WaitInterval = 15000 '* 15 second limit for waiting
Try
objQueue.Get(mqMsg, mqGetMsgOpts) ---- this is the line failed

what do I need to change?

Thanks,
Lei
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Wed Oct 06, 2004 10:50 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Try putting this line in after the :

mqGetMsgOpts = New MQGetMessageOptions


getTMopts.Options = MQC.MQGMO_NO_SYNCPOINT + MQC.MQGMO_CONVERT + MQC.MQGMO_WAIT + MQC.MQGMO_FAIL_IF_QUIESCING

If that doesn't work please give us a clue by telling us what the error message is.
Back to top
View user's profile Send private message
vennela
PostPosted: Wed Oct 06, 2004 11:35 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

For a browse :

getTMopts.Options = MQC.MQGMO_NO_SYNCPOINT + MQC.MQGMO_CONVERT + MQC.MQGMO_WAIT + MQC.MQGMO_FAIL_IF_QUIESCING + MQC.MQGMO_BROWSE_NEXT
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cliao
PostPosted: Wed Oct 06, 2004 12:48 pm    Post subject: Reply with quote

Novice

Joined: 08 Sep 2004
Posts: 23

Thank you for all your information. Now I can browse the messages in the queue.

Thanks for the help.

Lei
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 » sample for browsing message in vb.net
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.