Why do I get "Incorrect Syntax near the Keyword 'by'" error message when calling SQLDescribeParam in the Microsoft SQL Server ODBC driver?

This was a bug in MDAC 2.6 and is fixed in MDAC 2.6 sp1.

It happens if you have a column named c, ca, or cas and you call SQLDescribeParam, because the driver is checking for a CASE statement and does the check incorrectly.