Author |
Message
|
Le_Quang_Hoa |
Posted: Tue Jun 07, 2005 2:16 am Post subject: How to get Message by Index |
|
|
 Apprentice
Joined: 14 May 2005 Posts: 29 Location: Viet nam
|
Dear all
I want to get each message from queue by index
I write by ASP. net but I don't know how to get it
Thanks _________________ Le Quang Hoa (Mr)
Email :hoa.lequang@gmail.com
YM: hoalq98
Ha noi City - Viet Nam |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jun 07, 2005 3:36 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What index? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Le_Quang_Hoa |
Posted: Tue Jun 07, 2005 5:22 am Post subject: |
|
|
 Apprentice
Joined: 14 May 2005 Posts: 29 Location: Viet nam
|
Dear ,
for ex: my queue has 10 Message
I want to get message 7th in this queue
How I can do it with ASP Net _________________ Le Quang Hoa (Mr)
Email :hoa.lequang@gmail.com
YM: hoalq98
Ha noi City - Viet Nam |
|
Back to top |
|
 |
Nigelg |
Posted: Tue Jun 07, 2005 5:52 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
There is no option to get the 7th msg directly.
You could browse the queue with lock and count the msgs. When you get to the 7th msg, get the msg under the cursor.
Alternatively, browse all the msgs and save the MsgId. Then get by MsgId the msg you want. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jun 07, 2005 5:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Why do you want to do this?
It is pretty much trying to treat a queue as a database. And a queue is not a database?
What are you trying to accomplish by doing this? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Le_Quang_Hoa |
Posted: Tue Jun 07, 2005 6:07 pm Post subject: |
|
|
 Apprentice
Joined: 14 May 2005 Posts: 29 Location: Viet nam
|
Thank for reply
My app do :
I want to sure that each message was input into Database before I clear it?
How I can get Message by MessageID?
any one have code
Thanks _________________ Le Quang Hoa (Mr)
Email :hoa.lequang@gmail.com
YM: hoalq98
Ha noi City - Viet Nam |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 08, 2005 3:15 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Le_Quang_Hoa wrote: |
I want to sure that each message was input into Database before I clear it? |
Then you want to use a coordinated transaction, not anything else.
This is also known as two-phase commit, or XA.
There are samples on the IBM page at http://www.developer.ibm.com/isv/tech/sampmq.html that will help you at least some. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|