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 » Sample problem

Post new topic  Reply to topic
 Sample problem « View previous topic :: View next topic » 
Author Message
rameshmetta
PostPosted: Wed Oct 03, 2012 5:12 am    Post subject: Sample problem Reply with quote

Newbie

Joined: 03 Oct 2012
Posts: 2

Hi Experts,
I'm a newbie and practicing myself by trying the samples.
I'm able to connect and retrieve the data from DB in this sample.
But looks like there is some issue with below statement :
If XMLFLIGHTTB has columns A, B, C respectively - then if i want my Environment variable should contain as below :
Environment.Variables.A
Environment.Variables.B
Environment.Variables.C
then will the below statement works ?
or do i need to use like this : "SET Environment.Variables.TableInfo[] =" !!
if i have to change the below statement, i need to change complete code which i'm ready to do but want to confirm if i'm missing anything here..!!!
-- populate the environment with flight info from the database
SET Environment.Variables =
THE (SELECT T.* FROM Database.XMLFLIGHTTB AS T
WHERE T.FLIGHTDATE = Root.XMLNSC.Reservation.FlightDetails.FlightDate
AND T.FLIGHTNO = Root.XMLNSC.Reservation.FlightDetails.FlightNumber);

Request to help.
Thank YOu.
Ramesh


Last edited by rameshmetta on Wed Oct 03, 2012 5:20 am; edited 1 time in total
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Oct 03, 2012 5:17 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

A couple of etiquette pointers:

1. Don't reopen old threads, start your own.

2. Use [c o d e] tags when posting log output or source code.


The question you have is a basic one.

3. Read the InfoCentre before you post.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp


Many people find the training helpful.

4. Take the training for WMB before you post.

https://www-304.ibm.com/jct03001c/services/learning/ites.wss/us/en?pageType=course_description&courseCode=WM664
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed Oct 03, 2012 5:19 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

rameshmetta wrote:
then will the below statement works ?
"SET Environment.Variables.TableInfo[] =" !!


a) Try it - that's the point of the sample
b) No - because that statement references something called TableInfo & doesn't reference A, B or C

rameshmetta wrote:
or do i need to use like this :

-- populate the environment with flight info from the database
SET Environment.Variables =
THE (SELECT T.* FROM Database.XMLFLIGHTTB AS T
WHERE T.FLIGHTDATE = Root.XMLNSC.Reservation.FlightDetails.FlightDate
AND T.FLIGHTNO = Root.XMLNSC.Reservation.FlightDetails.FlightNumber);


See a) above.

It's better, but still doesn't reference A,B or C. Also * in a select is as bad here as it is in any SQL against a database. Sooner or later someone will add or remove a column.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rameshmetta
PostPosted: Wed Oct 03, 2012 5:29 am    Post subject: Reply with quote

Newbie

Joined: 03 Oct 2012
Posts: 2

@lancelotlinc - noted with thanks. will not be repeated again.
@Vitor - thank you for the reply sir.That was helpful.
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 » Sample problem
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.