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 » need sample code in vb.net on set the trigger on and off

Post new topic  Reply to topic
 need sample code in vb.net on set the trigger on and off « View previous topic :: View next topic » 
Author Message
cliao
PostPosted: Fri Oct 08, 2004 8:59 am    Post subject: need sample code in vb.net on set the trigger on and off Reply with quote

Novice

Joined: 08 Sep 2004
Posts: 23

Can some one give me an example on how to set the trigger on and off on an queue using vb.net?

Thanks,
Lei
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Oct 08, 2004 11:28 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

If you have access to WMQ 5.3 (CSD5 or later) machine, you can find some vb.net sample programs in <wmq_home>\Tools\dotNet\samples\vb directory. Also, look at Using .NET manual. There are methods in MQQueue class to set these properties.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
cliao
PostPosted: Mon Oct 11, 2004 6:33 am    Post subject: Reply with quote

Novice

Joined: 08 Sep 2004
Posts: 23

I know there's sample programs come with it. However, there no sample on how to turn the trigger of the queue on/off.
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Oct 11, 2004 11:23 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Well, you need to read the Using .NET manual for that. Take a look at properties for MQQueue class. You can use TriggerControl method.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
cliao
PostPosted: Wed Oct 13, 2004 11:39 am    Post subject: Reply with quote

Novice

Joined: 08 Sep 2004
Posts: 23

sorry to bother you, but would you please let me know where I can get that manual?

Thanks,
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Oct 13, 2004 11:49 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

<WMQ_HOME>/csqzav01.pdf. Provided you have applied a FixPac that supplies it.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
kirani
PostPosted: Wed Oct 13, 2004 1:21 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

or download it from here ..
http://publibfp.boulder.ibm.com/epubs/pdf/csqzav03.pdf
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Wed Oct 13, 2004 3:29 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Nice. Both csqzav01.pdf and csqzav03.pdf are the same: GC34-6328-02.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
cliao
PostPosted: Mon Oct 18, 2004 8:07 am    Post subject: Reply with quote

Novice

Joined: 08 Sep 2004
Posts: 23

this is what I have, and I got the mq selector error.

************************************************************
Try
objQueue = objQMgr.AccessQueue(strQname, MQC.MQOO_SET + MQC.MQOO_INQUIRE + MQC.MQOO_FAIL_IF_QUIESCING) '* open queue for input but not if MQM stopping
If iOption = 0 Then
objQueue.Set(lSel(2), lIntArr(0), cChar2)
ElseIf iOption = 1 Then
'objQueue.TriggerControl(MQC.MQTC_ON)
End If
TriggerControl = True
Catch ex As IBM.WMQ.MQException
Console.WriteLine("Error accessing the trigger")
Console.WriteLine(ex.Reason)
Console.WriteLine(ex.Message)
TriggerControl = False
End Try
************************************************************
what I have for lSel is: lSel = New Integer() {MQC.MQIA_CURRENT_Q_DEPTH, MQC.MQIA_OPEN_INPUT_COUNT, MQC.MQIA_TRIGGER_CONTROL}
and lIntArr is lIntArr = New Integer() {0, 1}

Thanks for your help.

Lei
Back to top
View user's profile Send private message
JasonE
PostPosted: Fri Oct 22, 2004 2:34 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

Have you solved this problem? If not, I'll take a look (I'm not in the office at the moment which is why I havent been answering)
Back to top
View user's profile Send private message
cliao
PostPosted: Thu Nov 11, 2004 7:24 am    Post subject: Reply with quote

Novice

Joined: 08 Sep 2004
Posts: 23

Yes, I have solve the problem. Thanks for all the help.

cl
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 » need sample code in vb.net on set the trigger on and off
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.