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 » PASSTHRU

Post new topic  Reply to topic
 PASSTHRU « View previous topic :: View next topic » 
Author Message
lamtbs
PostPosted: Wed Mar 29, 2006 2:22 am    Post subject: PASSTHRU Reply with quote

Acolyte

Joined: 07 Nov 2005
Posts: 57
Location: Hong Kong

Hi all,

I'm trying the PASSTHRU function, so I use a statement that works before, and add PASSTHRU to it, but got the following SQL error

Any idea why the difference?
Thanks!


SET LocalEnvironment.Variables.Logical.KeyEntry[] =
PASSTHRU('SELECT L.LogicalTableName, L.PhysicalTableName,
L.ATTRIBUTE, L.SEQ,
L.ColumnName, L.ColumnLength
FROM Database.LOGICAL_TABLE AS L
WHERE L.LogicalTableName = Root.XML.go.key'
);

and it return error in runtime : Text = [IBM][CLI Driver][DB2/NT] SQL0204N
"DATABASE.LOGICAL_TABLE" is an undefined name. SQLSTATE=42704
Back to top
View user's profile Send private message Send e-mail MSN Messenger
mgk
PostPosted: Wed Mar 29, 2006 2:34 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Well, as the Error says,

Quote:
"DATABASE.LOGICAL_TABLE" is an undefined name.


PASSTHRU sends the string you give it to the DB exactly with no changes. PASSTHRU can only be used to talk to a DB so there is not need to use the Database correlation name. Remove it.

When you have do that, the next error you will hit is that the DB has no idea what "Root.XML.go.key" is. Look up PASSTHRU in the docs for examples of usage, and always use parameter markers (?) where you can. Remember PASSTHRU has to be given SQL that will work on your DB's command line (with the exception of parameter markers) and cannot be given ESQL exactly as you DB will not understand it.


Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Duke
PostPosted: Sun Apr 02, 2006 9:57 pm    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2004
Posts: 49
Location: Belgium

If you want to put a parameter you caould use:

SET LocalEnvironment.Variables.Logical.KeyEntry[] =
PASSTHRU('SELECT L.LogicalTableName, L.PhysicalTableName,
L.ATTRIBUTE, L.SEQ,
L.ColumnName, L.ColumnLength
FROM DBName.LOGICAL_TABLE AS L
WHERE L.LogicalTableName = (?)', Root.XML.go.key
);
_________________
Pierre Richelle

Engineer
IBM Certified MQSeries Developper V5.3
IBM Certified WMQ Administration V6
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PASSTHRU
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.