ODBC: Function sequence error.
I recently ran into an error like this yesterday:
ERROR [HY010] [Microsoft][ODBC
SQL Server Driver]Function sequence error
Turns out, it was a simple fix. My query was essentially
select * from table
All I had to do was remove the ‘use DatabaseName’ line and everything worked well.