Ray Van Dolson | 11 Aug 2009 22:12
Favicon

Getting odd syntax error...

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)

Ray Van Dolson | 11 Aug 2009 23:07
Favicon

Re: Getting odd syntax error...

On Tue, Aug 11, 2009 at 01:12:08PM -0700, Ray Van Dolson wrote:
> 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).

Egg on my face.  This appears to be a known issue with pymssql 1.0.1.
Upgrading to 1.0.2 fixed the problem:

  - fixed severe bug introduced in 1.0.0 that caused some queries to be
    truncated or overwritten with binary garbage - many thanks to Igor
    Nazarenko who found the exact cause of the bug,

Sorry for the noise all.

Ray

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Oleg Broytmann | 12 Aug 2009 09:44
X-Face
Picon
Favicon

Re: Getting odd syntax error...

On Tue, Aug 11, 2009 at 02:07:17PM -0700, Ray Van Dolson wrote:
> On Tue, Aug 11, 2009 at 01:12:08PM -0700, Ray Van Dolson wrote:
> > 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).
> 
> Egg on my face.  This appears to be a known issue with pymssql 1.0.1.
> Upgrading to 1.0.2 fixed the problem:
> 
>   - fixed severe bug introduced in 1.0.0 that caused some queries to be
>     truncated or overwritten with binary garbage - many thanks to Igor
>     Nazarenko who found the exact cause of the bug,

   Good!

> Sorry for the noise all.

   Ok.

Oleg.
--

-- 
     Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
(Continue reading)


Gmane