Hello, I have the following stored procedure
PROCEDURE `IsProductInForeignDatabase`(IN stock INTEGER(11), OUT MyResult VARCHAR(1000), IN Behaviour VARCHAR(20)) The procedure above returns the "MyResult" out parameter. I have a stored function as well thas has the body: Begin Declare MyResult VARCHAR(1000); set MyResult = ''; call `IsProductInForeignDatabase`(1, MyResult,'question'); RETURN 50; END; In the code above the "return 50" is only a test: if I use the "call" statement in the body then the function will return nothing at all, on the contrary when I don't use the "call" statement, then it returns 50. The problem should be with the "MyResult" variable, but I don't know what to do. I tried with "@" sign, with no difference. It is interesting that if I call the procedure within an Sql window it works perfectly like this: CALL `IsProductInForeignDatabase`(1, @w,'question'); SELECT @w; If it worked the end of the function would be "return MyResult". Thank you in advance Zsolt Csillag www.egyediszoftverek.hu www.starsoft.hu