The following simple program dies (stack trace follows). It is in fact
because of unicode character strings, because the same program works
if you remove the "u" from in front of the strings.
import data.config.db
from sqlalchemy import *
sa = data.config.db.sqlalchemy(schema="DataTables", echo=False)
tbl = Table('MedicalDeviceDaily', sa.metadata, autoload=True,
schema="DataTables")
dat = dict(
title = u"Some guy something",
author = u"Something some guy",
article = u"art ICK ull"
)
tbl.insert().execute(dat)
<!-- ~/Documents/DataProc/Development/web/app tbrannon --> python
simple.py
conn_url mssql://perl2:[EMAIL PROTECTED]:1433/DATA
Traceback (most recent call last):
File "simple.py", line 15, in <module>
tbl.insert().execute(dat)
File "build/bdist.macosx-10.4-i386/egg/sqlalchemy/sql.py", line 774,
in execute
File "build/bdist.macosx-10.4-i386/egg/sqlalchemy/sql.py", line 667,
in execute
File "build/bdist.macosx-10.4-i386/egg/sqlalchemy/engine/base.py",
line 726, in execute_compiled
File "build/bdist.macosx-10.4-i386/egg/sqlalchemy/engine/base.py",
line 503, in execute_compiled
File "build/bdist.macosx-10.4-i386/egg/sqlalchemy/engine/base.py",
line 499, in proxy
File "build/bdist.macosx-10.4-i386/egg/sqlalchemy/engine/base.py",
line 547, in _execute_raw
File "build/bdist.macosx-10.4-i386/egg/sqlalchemy/engine/base.py",
line 566, in _execute
sqlalchemy.exceptions.SQLError: (DatabaseError) internal error: None
'INSERT INTO [DataTables].[MedicalDeviceDaily] (author, title,
article) VALUES (%(author)s, %(title)s, %(article)s)' {'article':
u'art ICK ull', 'title': u'Some guy something', 'author': u'Something
some guy'}
<!-- ~/Documents/DataProc/Development/web/app tbrannon -->
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---