Posted: Mon Dec 05, 2005 2:03 pm Post subject: Return value from SQL Server 2K SP
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....
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
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