On May 3, 2007, at 11:25 AM, shday wrote:
>
> I'm getting this error even though I have convert_unicode = True and
> the proper NLS_LANG setting:
>
> SQLError: (NotSupportedError) Variable_TypeByValue(): unhandled data
> type unicode 'DELETE FROM model_acc_protocol WHERE
> model_acc_protocol.model_id = :model_id AND
> model_acc_protocol.acc_protocol_id = :acc_protocol_id AND
> model_acc_protocol.color = :color' {'model_id': 60, 'color': u'RED',
> 'acc_protocol_id': u'2001-99'}
>
> I know my convert_unicode = True is doing something because it solved
> others problems before. Somehow it isn't working here. One thing that
> is different here is that the values u'RED' and u'2001-99' were pulled
> from the database during the same flush(). In the select statement
> just before this one these value were bound as 'RED' and '2001-99'
> instead of unicode.
>
those two values should not be u'' strings. therefore it would
appear that those bindparams are untyped. if you are using bindparam
() directly, add "type=Unicode" to it. similarly for whatever other
constructs youre making which arent derived from a Column, make sure
types are sent in as appropriate. ( a construct derived from a
Column would look like mytable.c.somecolumn == u'foo', in that case
the Unicode type should be generated automatically).
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---