its almost certainly related to case sensitivity. note that SQLA makes a hard distinction between "case sensitive" and "case insensitive" names for tables and columns. by using all uppercase names, or MixedCase names, youre telling SQLA to quote all identifiers and match those names exactly.
Basically, if you can go to your SQL terminal and select columns using all lower case names without any quoting, then you should be using case insensitive identifiers, which means all lower case names defined for your Column objects. the usage of reflection (autoload=True) also raises the chance of things going wrong here, so you might want to see what comes back when you reflect a table. if you could forego the usage of autoload=True that would be one less piece of the chain which could break. to narrow the problem down, try building a short test case, try using reflection and then not, etc. Mike Driscoll wrote: > > Just an FYI: I put pyodbc 2.1.4 (and its dependencies) onto my Ubuntu > test bed and SA is giving me the same error. > > Mike > > > > On Mar 23, 1:06 pm, "Michael Bayer" <[email protected]> wrote: >> we'd need to know what "stopped working" means, and also note that our >> MSSQL support is strongest with pyodbc and not so much with adodbapi. >> >> Mike wrote: >> >> > Hi, >> >> > I was using SqlAlchemy 0.5.0rc4 (and Python 2.5) on Ubuntu 8.10 and it >> > was working great. Then one of my users upgraded to SA 0.5.2 and now >> > one of my queries stopped working. Here's what my query looks like: >> >> > <code> >> > query = session.query(GE.ID, GE.FNAME, GE.LNAME, >> > GE.DATE, GE.SALVAR).filter_by >> > (NETNAME=str(username)) >> > userInfo = query.first() >> > </code> >> >> > I have the adodb module installed and I think that is what SA is >> > using. The database is on Microsoft SQL Server 2000. I am using the >> > autoload functionality to create the Table object: >> >> > overview_tbl = Table('GEOverview', metadata, >> > Column('id', Integer, primary_key=True), >> > autoload=True) >> >> > Any ideas on what's different between the two versions that would >> > cause this? I have a feeling this will probably effect my Windows >> > users too if I upgrade them. >> >> > Thanks, >> >> > Mike > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
