SQLAlchemy 0.8.1 + fdb, row size

15 views
Skip to first unread message

graf

unread,
Jun 17, 2013, 9:44:39 AM6/17/13
to sqlal...@googlegroups.com
I use sqlautocode to get declarative tables of the Firebird and now, when I try to insert new row with unicode value for the field to the database I got an error

ValueError: Value of parameter (30) is too long, expected 20, found 22'
which is Column('Myfield', VARCHAR(length=20)),

The db codepage is "WIN1251"

engine = create_engine('firebird+fdb://%(user)s:%(password)s@%(host)s:%(port)s/%(path)s' % firebird_params)

It works for kinterbasdb, is that issue with fdb?

Michael Bayer

unread,
Jun 17, 2013, 12:38:24 PM6/17/13
to sqlal...@googlegroups.com
this would be a difference in how they handle unicode. I've run tests for fdb here against unicode values and haven't observed that issue.

its possible fdb is doing the right thing here. You should carefully look at how non-ASCII characters are being placed in that column both with kinterbasdb and with fdb.


Reply all
Reply to author
Forward
0 new messages