ascot diagnostics

A1935

Error: Too many arguments: ‘{name}’ takes {takes}; the statement fails when it runs

A stored procedure called with more arguments than its method or class query declares, and no args... to take the rest. IRIS refuses to compile a CALL with too many arguments (SQLCODE -370); a function compiles and fails inside the method with <PARAMETER>, SQLCODE -149, when the statement runs.

IRIS compiles the example. Checked without an environment, as --iris none.

Class Demo.SqlTooManyArguments
{

ClassMethod Twice(n As %Integer) As %Integer [ SqlProc ] //! A8061
{
    Quit n * 2
}

ClassMethod Run() As %Integer //! A8061
{
    &sql(SELECT Demo.SqlTooManyArguments_Twice(1, 2) INTO :result) //! A1935
    Quit result
}

}

All diagnostics