When you use Microsoft SQL Server ODBC driver version 3.70.0623 or 3.70.0690, and call the
SQLPrepare function on a statement similar to the following:
SELECT A.title_id FROM titles A WHERE A.title_id IN (?) GROUP BY A.title_id
UNION
SELECT B.title_id FROM titles B WHERE B.title_id IN (?) GROUP BY B.title_id
and then you call the
SQLDescribeCol function, the following error may occur:
[Microsoft][ODBC SQL Server Driver]Prepared statement is not a cursor-specification
The statements execute correctly if the
GROUP BY clauses are removed from the
SELECT statements. The statements also execute correctly if the
GROUP BY clauses remain and you remove the
UNION clause, so that each statement is executes separately.