Oh, I understand. Thank you so much! :) On Fri, Oct 24, 2014 at 7:28 PM, Anthony <abasta...@gmail.com> wrote:
> Looks like the MSSQL2 adapter stores booleans as "T" and "F" character > values, so you may need to convert your 1's and 0's to "T" and "F". > > Anthony > > > On Friday, October 24, 2014 7:14:47 AM UTC-4, Gianganh Nguyen wrote: >> >> Sorry, this issue just occur in *mssql2.* >> >> >> Vào 17:36:52 UTC+7 Thứ sáu, ngày 24 tháng mười năm 2014, Gianganh Nguyen >> đã viết: >>> >>> >>> Hello to everybody, >>> I have a question, please answer for me! >>> >>> In the model, I define a field: >>> >>> *db.define_table('mytable',* >>> * Field('is_imported', 'boolean', default = >>> False), ...)* >>> *db.**mytable* >>> *.insert(is_imported = True,..)* >>> *db.**mytable**.insert(is_imported = False,..)* >>> >>> In the controller, I write: >>> *records = db(db.mytable.id >>> <http://db.mytable.id>).select(db.mytable.is_imported)* >>> *for record in records:* >>> * print record.**is_imported* >>> >>> Result: >>> *False* >>> * False* >>> >>> Expected result: >>> *True* >>> * False* >>> >>> And I see with boolean fields, command select always return *False *for >>> every values (0, 1) in mssql. >>> I were trying with all mssql and mssql2, they had same result. >>> >>> Please tell me why. >>> Thanks. >>> >>> -- > 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/eB0DFcfFjjY/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- *GianganhnguyenCS - Soict - Hust - K52* *Mobile: 0975814385* -- 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.