Clicking the "Advanced Search" link when using the mssqlnative driver (http://area51.phpbb.com/phpBB/viewtopic.php?p=206934#p206934) causes a general error to be thrown;
| General Error | 
| SQL ERROR [ mssqlnative ] | 
|  | 
| SQLSTATE: 42000 code: 402 message: [Microsoft][SQL Server Native Client 10.0][SQL Server]The data types text and varchar are incompatible in the not equal to operator. [402] | 
|  | 
| SQL | 
|  | 
| SELECT TOP 5 search_time, search_keywords FROM phpbb_search_results WHERE search_keywords <> '' ORDER BY search_time DESC | 
|  | 
| BACKTRACE | 
|  | 
| FILE: includes/db/mssqlnative.php | 
| LINE: 313 | 
| CALL: dbal->sql_error() | 
|  | 
| FILE: includes/db/mssqlnative.php | 
| LINE: 370 | 
| CALL: dbal_mssqlnative->sql_query() | 
|  | 
| FILE: includes/db/dbal.php | 
| LINE: 170 | 
| CALL: dbal_mssqlnative->_sql_query_limit() | 
|  | 
| FILE: search.php | 
| LINE: 1171 | 
| CALL: dbal->sql_query_limit()
 | 
This error can be resolved by inserting the following code on line 1158 of search.php;
| case 'mssqlnative': | 

