private nTemplateID, nBlockCount nBlockCount = 0 nTemplateID = thisform.oCurrentNode.values("TemplateID").value =mySQLExec("execute dbo.rsGetBlocks @TemplateID = ?m.nTemplateID, @BlocksCount = ?@nBlockCount OUTPUT" , 'rsTSBlocks',program())>I used the second Sergey's example and change the order of parameters. And the data in SQL was filled according to the parameter names not position. I will test again to be sure that this is how it works.