Advantage Error Guide
Problem: The SQL engine was not able to determine the data type of a parameter within the query. See Parameters in SQL Statements for more information.
Solutions:
Make sure you do not have a query of the form "SELECT * FROM mytable where ? = ?". One of the parameters must be specified so that the data type can be determined.
Use the Cast scalar function to explicitly specify the data type of the parameter.