I am migrating my underlying database from Sybase to SQL Server. The ESQL code which was working on Sybase is not working on SQL Server.
Basically I am trying to call a stored procedure from an ESQL function. This stored procedure returns some columns with values which I am trying to collect in a ESQL list. But this list is not able to collect the values once the stored procedure call is completed.
Here's my code for calling a ESQL function:
while I < n
Declare MyList reference to Environment.XMLNSC.MyData.LIST[I];
Create Field Enviornment.XMLNSC.MyData.LIST[I].GetParams;
Call MyParamsFunctionESQL (MyList, Enviornment.XMLNSC.MyData.LIST[I]GetParams);
//Here's is the definition of MyParams Funcion
Create Procedure MyParamsFunctionESQL (In List1 Reference, In Params)
Begin
Declare Value1, Value2 Integer;
Set Value1 = CAST(List1.Value1 AS Integer);
Set Value2 = CAST(List1.Value2 AS Integer);
//Here's the call for DB stored procedure functon
Call MyParamsFunction(Value1, Value2, Params.GetMyParams[]) IN database.(getDNS("MyDSN")).dbo
END;
// Here's the definition for the stored procedure
Create Procedure MyParamsFunction
(
IN Value1 Integer;
IN Value2 Integer;
) Language Database
Dynamic Result Set 1
External Name "dbo.MyParamsFunction"
I am expecting that after the stored procedure call, the values returned by the stored procedure should be collected in the list GetMyParams[], but I am not getting the values in that list
------------------------------
Brajesh Shukla
------------------------------