  | | | sdb.sql error in python 2.5 interface | sdb.sql error in python 2.5 interface 2007-03-28 - By Olivier Fournier
Back 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/maxdb?unsub=mysql@(protected)
|
|
 |