Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
Unexpected exceptions in the python interface

Unexpected exceptions in the python interface

2007-06-20       - By Christian Ullrich

 Back
I'm trying to access a MaxDB 7.6 instance via python (2.5, see my other
post). Since I expect there to be connection timeouts in my application,
I need to make sure that a disconnected connection reconnects when
needed.

According to the documentation, and the python DB-API 2.0 spec, issuing
a query over a connection that has become disconnected should raise an
OperationalError exception (or a CommunicationError when using sapdb.sql
instead of maxdb.dbapi).

In my experience, which I gained by setting the connection timeout to 31
seconds (the lowest value permitted), connecting to the database,
waiting until the session disappeared from the DBM and then sending a
query, that doesn't happen. Instead I get a ProgrammingError via DB-API
and an SQLError from sapdb.sql.

What am I doing wrong? If I get what amounts to a syntax error, how can
I know what actually happened?

--
 Christian Ullrich  .  E-Mails sollten Text sein, Text und nur Text.
                    .  Wenn Gott gewollt h??tte, dass E-Mails in HTML
   Registrierter    .  geschrieben w??rden, endeten Gebete traditionell
Linux-User #125183  .  mit <amen/>.

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/maxdb?unsub=mysql@(protected)