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 » WebSphere Message Broker (ACE) Support » Array

Post new topic  Reply to topic
 Array « View previous topic :: View next topic » 
Author Message
brgmo
PostPosted: Thu Jun 12, 2008 2:39 am    Post subject: Array Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Hi All,

Any ideas,what is the best way of handling multiple rows that are returned after firing a esql query. I mean,can i wrie a function or procedure which will query a database and return multiple records as an array.

Regards
brgmo
Back to top
View user's profile Send private message
AkankshA
PostPosted: Thu Jun 12, 2008 3:04 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

multiple rows can be returned from Db as an array....

u need to store the result in environment tree..
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
brgmo
PostPosted: Thu Jun 12, 2008 3:50 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Akansha,can you please give me a snippet of the code which copies data to Environment tree. I mean i am calling a procedure and then passing Environment as INOUT variable but the procedure is failing.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Thu Jun 12, 2008 3:54 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

well i don't have the toolkit with me now...

so u r calling a procedure in DB or in eSQL...???

if its an eSQL procedurere.. then simply assign the o/p of database query to env tree elements with array []

if its in DB then i fear the road ahead is not easy..
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Thu Jun 12, 2008 3:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

AkanshA...

There are no ARRAYs in ESQL.

There are only Trees and ROWS and LISTS.

Any time you use [] in ESQL, you are accessing a Tree element at a given position from the FIRSTCHILD.

brgmo - you are again asking a very basic question that you could have more easily, more quickly and better answered by 1) reading the documentation, 2) trying things first, 3) showing us what you read and what you tried if that did not work.


_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vinbud117
PostPosted: Thu Jun 12, 2008 3:59 am    Post subject: Reply with quote

Acolyte

Joined: 22 Jul 2005
Posts: 61

Read about THE and ITEM in esql reference. It's important to understand to what fields the values get assigned.

Sample snippet:
Environment.Variables.Student[] = SELECT name, class from Database.Student.
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 » WebSphere Message Broker (ACE) Support » Array
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.