2154 The data type of a parameter cannot be determined

Advantage Error Guide

Problem: A parameter by itself in the SELECT list or ORDER BY clause has an ambiguous data type. For example, given the statements "SELECT ? FROM mytable" or "SELECT * FROM myTable ORDER BY ?", the data type of the parameter in either statement cannot be determined.

Solution: Remove the ambiguous parameter from the statement. The use of the parameter in the SELECT list or ORDER BY clause is generally not meaningful.