Oninit Logo
The Down System Specialists
+1-913-674-0360
+44-2081-337529
Partnerships Contact
Finderr

-485 Number of host variables does not match SELECT list.

This error can occur only if your database is ANSI compliant. The error indicates that the number of host variables in an ESQL statement is not the same as the number of values that the database server returns. In addition, a warning flag is placed in the third element of the sqlwarn structure of sqlca.

The execution of the second statement in the following ESQL/C example returns this error:

$create table mytab (i integer, f float) $select * into :var1 from mytab; --error

If your database is not ANSI compliant, this and similar statements complete without error, and the values of the host variables are set in sequence to their respective returned values. If the number of returned values is smaller than the number of host variables, the remaining host variables are undefined. As with an ANSI-compliant database, a warning flag is placed in the third element of the sqlwarn structure of sqlca.