When one stored procedure is calling another stored procedure, the following requirements must be met for using the three parameter types in order to properly allocate the SQLDA structure to the correct size:
An IN parameter calls only the SetParam function
An OUT parameter calls only the RegisterOutParam function
An INOUT parameter calls both the SetParam and RegisterOutParam functions in any order