[web2py] error ('', 'SQL_INVALID_HANDLE') when DAL is mssql
Hi everybody, In web2py, if I use db = DAL('mssql://...), the error ('', '*SQL_INVALID_HANDLE*') frequently occurs. But if I use db = DAL('sqlite://storage.sqlite', pool_size = 1, everything is okie. Please help me! 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 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/groups/opt_out.
[web2py] error ('', 'SQL_INVALID_HANDLE') when DAL is mssql
Hi everybody, In web2py, if I use db = DAL('mssql://...), the error ('', 'SQL_INVALID_HANDLE') frequently occurs. But if I use db = DAL('sqlite://storage.sqlite', pool_size = 1, check_reserved = ['all'], migrate_enabled = True), everything is okie. Please help me! -- 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/groups/opt_out.
[web2py] error ('', 'SQL_INVALID_HANDLE') when DAL is mssq
Hi everybody! In web2py, if I use db = DAL('mssql://...), the error ('', '*SQL_INVALID_HANDLE*') frequently occurs. But if I use db = DAL('sqlite://storage.sqlite', pool_size = 1, everything is okie. Please help me! -- 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/groups/opt_out.
[web2py] Re: error ('', 'SQL_INVALID_HANDLE') when DAL is mssq
This error is produced when the controller files execute a query string, example db(db.usr).select() or db(db.usr).count(). It does not always occur but frequently occur! But after I press F5, it is okay. Vào 06:17:49 UTC+7 Thứ năm, ngày 26 tháng mười hai năm 2013, Alan Etkin đã viết: > > In web2py, if I use db = DAL('mssql://...), the error > 'gluon.contrib.pypyodbc.ProgrammingError'> ('', '*SQL_INVALID_HANDLE*') >> frequently occurs. >> > > Can you please be more specific? What is the source code in you > application producing the error? > -- 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/groups/opt_out.
[web2py] Re: error ('', 'SQL_INVALID_HANDLE') when DAL is mssq
Hey, I resolved this issue follow: 1. Setup pyodbc-3.0.7.win32-py2.7.exe (download from http://code.google.com/p/pyodbc/downloads/list) 2. Insert to the db.py file: *import pyodbc from gluon.dal import MSSQLAdapterif not (MSSQLAdapter.driver):MSSQLAdapter.driver = globals().get('pyodbc',None)* And everything is okay. Thanks! *(^_^)* Vào 00:21:28 UTC+7 Thứ sáu, ngày 27 tháng mười hai năm 2013, Alan Etkin đã viết: > > This error is produced when the controller files execute a query string, >> example db(db.usr).select() or db(db.usr).count(). It does not always occur >> but frequently occur! >> > > Have you checked /databases/sql.log? > > Maybe you can post the last commands stored for debugging. > > -- 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/groups/opt_out.
[web2py] Re: Important New Year News: Edison Award
Best wish for you and web2py. :) Vào 11:08:38 UTC+7 Thứ bảy, ngày 04 tháng một năm 2014, Massimo Di Pierro đã viết: > > Web2py/me have been nominated for the Edison Award. Please wish web2py > (and me) good luck. :-) > > -- 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/groups/opt_out.
Re: [web2py] Re: error ('', 'SQL_INVALID_HANDLE') when DAL is mssq
Oh, I'm sorry because now I'm checking mail. I didn't get that error. But I use driver pyodbc-3.0.7.win32-py2.7.exe for python2.7.5. Are you using what is python's version? On Fri, Jan 17, 2014 at 5:57 AM, Josh Myers wrote: > I was also getting this same error and I thank Gianganh for his help in > moving me along. > > Now, using the solution above, instead of getting the SQL_INVALID_HANDLE, > I am getting the following: > > " ('HY000', 'The driver did not supply an error!')" > > Gianganh, did you also get this error? Or, if you didn't, do you know how > I can fix this? > > > - Josh > > > > > On Thursday, December 26, 2013 10:13:36 PM UTC-5, Gianganh Nguyen wrote: >> >> Hey, >> I resolved this issue follow: >> 1. Setup pyodbc-3.0.7.win32-py2.7.exe (download from >> http://code.google.com/p/pyodbc/downloads/list) >> 2. Insert to the db.py file: >> >> >> >> >> *import pyodbc from gluon.dal import MSSQLAdapterif not >> (MSSQLAdapter.driver):MSSQLAdapter.driver = >> globals().get('pyodbc',None)* >> >> And everything is okay. >> >> Thanks! >> *(^_^)* >> >> Vào 00:21:28 UTC+7 Thứ sáu, ngày 27 tháng mười hai năm 2013, Alan Etkin >> đã viết: >>> >>> This error is produced when the controller files execute a query string, >>>> example db(db.usr).select() or db(db.usr).count(). It does not always occur >>>> but frequently occur! >>>> >>> >>> Have you checked /databases/sql.log? >>> >>> Maybe you can post the last commands stored for debugging. >>> >>> -- > 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/gaP-XmMhMg0/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/groups/opt_out. > -- *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/groups/opt_out.
[web2py] Question about a field boolean in MSSQL
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).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 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.
[web2py] Re: Question about a field boolean in MSSQL
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 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.
Re: [web2py] Re: Question about a field boolean in MSSQL
Oh, I understand. Thank you so much! :) On Fri, Oct 24, 2014 at 7:28 PM, Anthony 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.