Seems like a related issue still exists in web2py 2.9.11 for Microsoft SQL 
Server.

list:integer type fields get mapped to 'text' type fields in MS SQL. The 
text type fields cannot use functions like 'LOWER', only varchar type 
fields can. So now queries like field.contains(<integer>) will not work 
because the DB throws an error "Argument data type text is invalid for 
argument 1 of lower function. (8116)".

Changing the type of the field in the database would fix the issue, but 
that requires droppping and recreating the table. Not something done 
trivially.

Recommended workarounds?

On Friday, September 12, 2014 11:07:42 PM UTC-4, Massimo Di Pierro wrote:
>
> done
>
> On Thursday, 11 September 2014 23:34:43 UTC-5, Joe Barnhart wrote:
>>
>> Just set case_sensitive=False and it will work exactly the way you want 
>> regardless of the convention chosen.  I now set the case on my queries 
>> since it seems prudent to do so.  After all, I may change from Postgres to 
>> MySql or something and I don't want to be surprised.
>>
>> -- Joe
>>
>>
>> On Thursday, September 11, 2014 7:46:17 PM UTC-7, Leonel Câmara wrote:
>>>
>>> Nothing is exactly broken, but autocomplete uses "like" in its queries 
>>> when it's not running on gae, so, once this is decided, we need to either 
>>> set it case_sensitive=False or make it use ilike (so it has the same 
>>> behaviour on gae and other adapters)
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to