So, I\'m trying to use ODBC to execute a stored procedure in an SQL database, but it returns the error
odbc_fetch_array() [function.odbc-fetch-array]:
S
I ran into this problem as well. The way I got around it was to use
odbc_exec($connection, $sql)
Instead of
odbc_execute($connection, $sql)
Per a user comment here
Comment was:
BTW. If anyone is banging his head about "cursor type changed" warning while using execute with ORDER BY clause, then just use exec for now (remember to addslashes for yourself).
In PHP 5.3 a Bug #43668 will be fixed and it will allow you to change a cursor type to SQL_CUR_USE_ODBC
Note that you could also try to select a cursor type in odbc_connect, but that didn't work for me (much more problems appeared then it solved).
Apparently this is a bug in PHP, and will be patched per this
So try using odbc_exec() insted of odbc_execute() if you are having this problem.