On Tue, Dec 2, 2008 at 3:12 PM, Pezzi <[EMAIL PROTECTED]> wrote:
>
> All,
>
> I tried to switch from a sqlite to a SQL Server 2008 DB by switching
> the connection string in dev.cfg.
>
> All is well until I create a new instance with a PickleCol column.
>
> The error message is below
>
> 2008-12-02 15:13:49,125 turbogears.controllers DEBUG Calling <function
> _formatexception at 0x01689130> with *((<ncc.controllers.Root
> object at 0x01770AF0>, (<type 'exceptions.UnicodeDecodeError'>,
> UnicodeDecodeError('ascii', 'UPDATE match__model SET the_model =
> (\'\x80\x02 ...... fub.\') WHERE id = (2)', 38, 39, 'ordinal not in
> range(128)', <bound method Root.executebatchquery of
> <ncc.controllers.Root object at 0x01770AF0>>), <traceback object at
> 0x04B5EC38>))), **({})
>
> I suppose I need to somehow tell SQL Object / adodbapi to use a
> different encoding (utf-8 or none at all) with this connection - but I
> can't find any information on how to do that. Is there something I
> need to add to the dev.cfg ? Or the connection string ?
>
> I am running TG 1.0.7, SQL Object.0.10.2 and adodbapi, and SQL Server
> 2008 Express.
>
> I searched far and wide but it seems I am still pounding my head
> against a wall ...
>
Have you tried pyodbc instead of adodbapi?
If you try with pyodbc can replicate the error using the pyodbc?
If you have a connection string that works in pyodbc then we can tell
you what connection string would look like for sqlalchemy.
If you want to debug there was a thread called unixodbc sqlalchemy,
and in there it showed how to print the final "sql statement" so you
can just copy it and see if it works via pyodbc.
Lucas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---