[DB-SIG] Next Version
Greg Stein
gstein@lyra.org
Wed, 2 Feb 2000 14:53:13 -0800 (PST)
On Sun, 30 Jan 2000, M.-A. Lemburg wrote:
> Stuart 'Zen' Bishop wrote:
>...
> > cur.longlength = 2 * 1024 * 1024
> > cur.truncok = 1
>
> The truncok attribute is interesting... I would suggest to have
> a .dontreportwarnings attribute (or something along those lines)
> on both cursor and connection objects (or some other way to turn off
> reporting of warnings via exceptions). There are sometimes troubles
> with ODBC functions returning warnings and mxODBC having to
> raise a Warning exception: since some sequences cannot be completed
> because of the warning exceptions, there is considerable loss
> of functionality results for some DB backends (MS SQL Server being
> a prominent example). mxODBC currently solves this by simply ignoring
> some warnings...
Note that the setoutputsize() method is DBAPI's mechanism for handling
this.
Error handling when a truncation occurs is database-dependent.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/