This issue appears to be a problem in the ODBC driver. Actually SQLDescribeCol returns only
the first character of the column names, that's why the geometry column cannot be identified. This is >probably due to a misinterpretation of the widechar strings as single byte strings somewhere in the >driver.
I'm not sure what is meant by ODBC driver - the underlying Windows ODBC driver, or the driver based on mapmssql2008.c.
All was working fine (and still is) in MapServer 6.4, so I'm not sure what has changed in version 7.
After getting the code to compile and setting up the debugger on Windows I was able to find the cause of this issue.
It appears there have been changes to the ODBC types since Windows 2003.
Some ODBC functions that were previously defined with SQLINTEGER and
SQLUINTEGER parameters have been changed where appropriate to use the new SQLLEN and
SQLULEN typedefs. These changes are listed in the next section, Function Declaration Changes.