On Sep 22, 2009, at 11:09 AM, Mike Driscoll wrote:

>
> Hi,
>
> When I run a simple query like this:
>
> qry = session.query(CheckHistory)
> qry = qry.filter(and_(CheckHistory.CHECK_DATE >= '1/1/2007',
>                                CheckHistory.CHECK_DATE <=
> '1/1/2008'))
> res = qry.all()
>
> I get one CheckHistory row and a None. If I run the echoed SQL code in
> my database's query analyzer, I get almost 5000 results. Last Friday,
> this worked just fine. However, over the weekend, we upgraded from MS
> SQL Server 2000 to 2005. I don't see how this could have messed up
> SqlAlchemy, but something weird is going on here.
>
> Does anyone have any hints for troubleshooting this?
>
> I am using SqlAlchemy 0.5.6 on Windows XP with Python 2.5.

turn on echo='debug' on your engine and watch the SQL statements and  
results.   Also query(SomeClass).<criterion>.all() is not capable of  
returning "None" within the result list - it only returns entities or  
an empty list.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to