hran - Wednesday, April 3, 2013 9:02 AM:
I am trying to implement a stored procedure. I have defined the following function as SQL Store Procedure:
/* Test */
create function XW_Authenticate(@login_name varchar(32))
RETURNS CHAR(32)
AS
BEGIN
RETURN(SELECT ID FROM [USER] WHERE LOGIN_NAME = @LOGIN_NAME)
END
Calling the function from AML Studio (with admin identity):
<AML>
<Item type="SQL" action="SQL Process">
<name>XW_Authenticate</name>
<PROCESS>CALL</PROCESS>
<ARG1>xxxx</ARG1>
</AML>
I get the following error:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault xmlns:af="http://www.aras.com/InnovatorFault">
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring><![CDATA[Cannot find table 0. in SQL: exec XW_Authenticate 'xxx']]></faultstring>
<detail>
<af:legacy_detail><![CDATA[Cannot find table 0. in SQL: exec XW_Authenticate 'xxx']]></af:legacy_detail>
<af:exception message="Cannot find table 0. in SQL: exec XW_Authenticate 'xxx'" type="Aras.Server.Core.InnovatorDatabaseException">
<af:innerException message="Cannot find table 0." type="System.IndexOutOfRangeException" />
</af:exception>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
What is wrong?
Thanks
Norbert
Eric Domke - Wednesday, April 3, 2013 10:37 PM:
Nothing appears obviously wrong. Do you need to explicitly specify innovator.[User] as the table in (Select id from innovator.[user] where login_name = @login_name)?