Fix for SQL_FREERESULT()