[DB-SIG] [SOLVED]Re: no-error error
Lukasz Szybalski
szybalski at gmail.com
Wed Oct 24 21:36:05 CEST 2007
On 10/19/07, Lukasz Szybalski <szybalski at gmail.com> wrote:
> Hello,
> 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
the program.
Are truncation errors suppose to stop the write of data per API 2.0
specifications?
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:
print e
#do stuff
Thanks,
Lucas
--
--
Vim auto completion for python
http://lucasmanual.com/mywiki/FrontPage#head-8ce19b13e89893059e126b719bebe4ee32fe103c
TurboGears from start to finish:
http://www.lucasmanual.com/mywiki/TurboGears
More information about the DB-SIG
mailing list