11 Aug 2009 22:12
Getting odd syntax error...
Ray Van Dolson <rvandolson <at> esri.com>
2009-08-11 20:12:08 GMT
2009-08-11 20:12:08 GMT
Using sqlobject 0.9.9 with pymssql 1.0.1 on RHEL 5.3 (the
aforementioned have been installed with yum via either the base OS
packaeges or EPEL).
I have a class defined similar to the following:
class SystemsInfo(SQLObject):
class sqlmeta:
style = MixedCaseStyle(longID=True)
fromDatabase = False
table = 'SystemsInfo'
idType = str
idName = 'SystemName'
lazyUpdate = True
Department = StringCol(length=30, default=None)
Vendor = StringCol(length=80, default=None)
Model = StringCol(length=80, default=None)
... (lots more columns)
And eventually a very simple query as follows:
a = SystemsInfo.select(SystemsInfo.q.id == "SYSNAME")
item = a.getOne()
Debug output shows the following:
1/Select : SELECT SystemsInfo.SystemName, SystemsInfo.Department,
SystemsInfo.Vendor, SystemsInfo.Model FROM SystemsInfo WHERE
((SystemsInfo.SystemName) = ('SYSNAME'))
(Continue reading)
RSS Feed