I've been running an old version of web2py with MS-SQL for several years -
no issues and we we use executesql. But we limit it to kicking off a SPROC
or two, that's about it.
I've never dealt with the Express version though - wonder if there's a row
limit or something holding you back.
On Friday, November 15, 2013 10:07:41 PM UTC-5, Josh Myers wrote:
>
> Hey all,
>
> I am running web2py version 2.4.6 and python 2.7.4.
>
> I am using executesql to run raw ms sql queries, but I am having a problem
> with them consistently yielding results. I am still in test right now as I
> develop the app and I am running queries on a local database. I do not
> know if this is something with web2py, with me, or with my local database.
>
> Let me give you an example of what the problem is. Say I run a query as
> follows as a part of my code:
>
> test = db.executesql("select * from X")
>
> When the problem happens, test is set equal to None, and I assume that
> means the query failed to run, but I am not sure why. Also, of course an
> error is generated because the program tries to use test in some way that
> is impossible when it equals None. Without changing anything, I will
> re-run the statement and it will usually work, with test equal to the
> contents of table X.
>
> I have found this phenomenon happens more often the larger table X is. If
> X only has a few thousand rows, then it rarely ever happens, but if X has
> 100,000 rows it happens almost every time. In SQL Server Express, however,
> the few thousand row query run time will be instantaneous (0 seconds) and
> the 100,000 row query run time will be only 1 or 2 seconds, so it shouldn't
> be the case that the raw sql query is merely timing out.
>
> Has anyone else run into this before?
>
> - Josh
>
--
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/groups/opt_out.