sdb.sql error in python 2.5 interface

Olivier Fournier <[email protected]>
Newsgroups gmane.comp.db.maxdb
Message-ID <[email protected]>
hi,

Windows XP
python: 2.5
maxdb: 7.5

if I try:

import sys

import sdb.sql

#

# Connect to the database instance

# ---------------------------------------------------

database_user = sys.argv [1]

database_user_password = sys.argv [2]

database_name = sys.argv [3]

session = sdb.sql.connect (database_user, database_user_password, 
database_name)

#

# Execute a SELECT statement with an incorrect column

# name unknown (error in the SQL statement)

#----------------------------------------------------

select = "SELECT unknown FROM hotel.customer"

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'


with python 2.4 it's ok:

ERR [-4004] Unknown table name:CUSTOMER
SELECT unknown FROM hotel.customer
====================^
ERR [-4004] Unknown table name:CUSTOMER


bests regards
Olivier Fournier

-- 
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.