I'm running a query that should return at least 20000 rows. The query returns the whole of them when I run the query on a small test script, but returns nothing when I run it in my full app. The connection parameters are the same on both scripts and the query is a simple select:
select cola, colb, colc, cold from sometable where create_date >= '2009-01-01'
On my full app I'm executing other select queries to fetch data for local use/storage. The queries that have no where conditions are always successful, but the two that have the where clause with the date condition return nothing and no reason is given or exception is raised. Successful queries are executed before and after the troublesome queries with where clauses.
When I take either query out and run it on SSMS it runs perfectly. The same happens when I run either query on a test script.
If i make another connection in my full app and run the queries through it the queries return the rows I want, but I shouldn't have an open connection per query.
I'm truly baffled…
pymssql version 1.0.2 on Debian and Windows (same results on both)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm running a query that should return at least 20000 rows. The query returns the whole of them when I run the query on a small test script, but returns nothing when I run it in my full app. The connection parameters are the same on both scripts and the query is a simple select:
select cola, colb, colc, cold from sometable where create_date >= '2009-01-01'
On my full app I'm executing other select queries to fetch data for local use/storage. The queries that have no where conditions are always successful, but the two that have the where clause with the date condition return nothing and no reason is given or exception is raised. Successful queries are executed before and after the troublesome queries with where clauses.
When I take either query out and run it on SSMS it runs perfectly. The same happens when I run either query on a test script.
If i make another connection in my full app and run the queries through it the queries return the rows I want, but I shouldn't have an open connection per query.
I'm truly baffled…
pymssql version 1.0.2 on Debian and Windows (same results on both)
Nevermind, it seems the parameters were actually different. Doh!