[DB-SIG] [SOLVED]Re: no-error error
szybalski at gmail.com
Wed Oct 24 21:36:05 CEST 2007
On 10/19/07, Lukasz Szybalski <szybalski at gmail.com> wrote:
> I have a python program that converts some data and writes it via ODBC driver.
> I am using a win32 dbi,odbc to do that. (none of the free other ones work)
> I just upgraded my ODBC driver to a newer version that supposedly is a
> 2.0 compatible.
> Now I am getting a:
> dbi.no-error: [SoftVelocity Inc.][TopSpeed ODBC Driver]String or
> binary data would be truncated in EXEC
This error means that truncation would have to happen, so instead of
truncating the data the odbc driver decided to throw an error and exit
Are truncation errors suppose to stop the write of data per API 2.0
I have tried the ceODBC and the new version that will come out will
support the TopSpeed ODBC Driver 5.0 for tps data files.
Also, as a side not. If you ever come around a "Driver not capable"
error you need to set the autocommit=True.
c = ceODBC.Connection("DSN=MYDATASOURCE", autocommit = True)
> What I noticed is that dbi.no-error has given me this error. How do I
> except a 'no-error' error?
And if you need to except any errors from database:
except ceODBC.DatabaseError, e:
Vim auto completion for python
TurboGears from start to finish:
More information about the DB-SIG