RE: sdb.sql error in python 2.5 interface

"Dittmar, Daniel" <[email protected]>
Newsgroups gmane.comp.db.maxdb
Message-ID <[email protected]>
>>>
try:
    cursor = session.sql (select)
except sdb.sql.SQLError, err:
    print "ERR [%d] %s" % (err.errorCode, err.message)
    print select
    print ("=" * (err.errorPos - 1)) + '^'
#

I obtain:

print "ERR [%d] %s" % (err.errorCode, err.message)
AttributeError: 'SQLError' object has no attribute 'errorCode'
<<<

It looks as if setting attributes of exception objects is no longer possible with the standard C-API. Exceptions are 'new style classes' in Python 2.5 and seem to require a different set of APIs. I'm looking into it and will provide updated modules as soon as I have a solution.

Daniel Dittmar

-- 
Daniel Dittmar
MaxDB & liveCache
mailto:[email protected]

www.sap.com
Sitz der Gesellschaft/Registered Office: Walldorf, Germany
Vorstand/SAP Executive Board: Henning Kagermann (Sprecher/CEO), Shai Agassi, Léo Apotheker, Werner Brandt, Claus Heinrich, Gerhard Oswald, Peter Zencke
Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory Board: Hasso Plattner 
Registergericht/Commercial Register Mannheim No HRB 350269

Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.
Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank.

This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation. 

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.