I am using MS SQL Server 2005, and using odbc_connect with SQL_CUR_USE_ODBC.
I had a problem with odbc_fetch_array when getting results from a stored procedure that returns a text column. The misleading error I got was:
odbc_fetch_array() [function.odbc-fetch-array]: SQL error: [Microsoft][ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL state SL004 in SQLGetData
Eventually I found that by converting the text column in my database to varchar(8000), it worked fine. Perhaps using CONVERT or CAST might have worked too. I also found that varchar(max) columns were scrambled.