I committed a fix to pysql just now. Can you check it fixes the problem for 
you?

On Thursday, 3 August 2017 16:57:45 UTC-5, Razvan Cristian wrote:
>
>
> Hello all!
>
> I am in the process of learning web2py. I downloaded the binaries and the 
> sources for windows and give it a run but i encountered a problem.
>
> When i try to create a new user ( from welcome app )  i get the following 
> error : 
>
> " File "d:\web2py_surse\web2py\gluon\contrib\pypyodbc.py", line 954, in 
> ctrl_err
>     raise ProgrammingError(state,err_text)
> ProgrammingError: (u'42000', u"[42000] [Microsoft][ODBC SQL Server 
> Driver][SQL Server]Incorrect syntax near the keyword 'TOP'.") "  visual 
> studio debugger output
>
> and from sql profiler i see that the DAL generates the following sql : 
> "SELECT "auth_user"."id", "auth_user"."email" FROM "auth_user" WHERE 
> ("auth_user"."email" = '[email protected]') TOP 1;"  which it is 
> not correct , it should be   "SELECT  TOP 1 "auth_user"."id", 
> "auth_user"."email" FROM "auth_user" WHERE ("auth_user"."email" = '
> [email protected]') ;"
>
> I browsed a while through sources but can't find where the query is 
> generated...( still learning the web2py code :) )
>
> Any ideas? 
>
> PS: the error occurs even if i run from the binaries.
>
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to