Error converting data type varchar to datetime

If the output parameter of a stored procedure is varchar, when the variable of the datetime type calls the parameter, the following error message displays in the SQLCA Information: "Error converting data type varchar to datetime".

Cause: The varchar parameter fails to be converted to datetime, because the parameter length is too short in the database; for example, varchar(10).

Solution: Modify the code.

Call the varchar parameter with a string variable.