OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
RE: sdb.sql error in python 2.5 interface

From: Dittmar, Daniel (daniel.dittmarsap.com)
Date: Thu Mar 29 2007 - 07:14:46 CDT


>>>
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:daniel.dittmarsap.com

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