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 » Return value from SQL Server 2K SP

Post new topic  Reply to topic
 Return value from SQL Server 2K SP « View previous topic :: View next topic » 
Author Message
klabran
PostPosted: Mon Dec 05, 2005 2:03 pm    Post subject: Return value from SQL Server 2K SP Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

Is this the best/cleanest way to return a single value from an SP?

I am using WBIM 5 FP 6 and SQL 2K.

Code:

SET Environment.Variables.ORI[] = PASSTHRU('{call spORILookup(?)}',OutputRoot.XML.Arrest.ArrestAgency.OrganizationAbbreviationText);
SET OutputRoot.XML.Arrest.ArrestAgency.OrganizationORIID.ID = CAST(Environment.Variables.ORI.chrORI AS CHARACTER);


Thanks,
Kevin

PS - I love my ranking.... Master ..... HA! Far from it.... Maybe a master at posting questions....
Back to top
View user's profile Send private message Visit poster's website
Ian
PostPosted: Tue Dec 06, 2005 4:00 am    Post subject: Reply with quote

Disciple

Joined: 22 Nov 2002
Posts: 152
Location: London, UK

WBIMB v5 support for SQLServer stored procedures was enabled in WBIMB v5 FP6.

This means that SQLServer stored procedures can now be created with the CREATE PROCEDURE statement and called with a CALL statement.

Reference : v5 topic "ak04970_"

In line with your question, I would suggest that this is the best method of returning a single value from an SQLServer stored procedure.

Note, SQLServer considers OUTPUT parameters from stored procedures as INPUT/OUTPUT parameters. If you declare these as OUT parameters in your ESQL then you will encounter a type mismatch error at run time. To avoid this mismatch ensure you declare SQLServer OUTPUT parameters as INOUT in your ESQL.
_________________
Regards, Ian
Back to top
View user's profile Send private message
klabran
PostPosted: Tue Dec 06, 2005 3:24 pm    Post subject: Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

Thanks!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Return value from SQL Server 2K SP
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.