Werner,

On Aug 29, 2:21 am, "Werner F. Bruhin" <[EMAIL PROTECTED]> wrote:
> Mike,
>
> Mike wrote:
>
> ....
>
> > I found the issue. For some reason, SqlAlchemy is passing a unicode
> > string to a varchar field in SQL Server, which is causing an error to
> > be raised. If I explicitly set the value to an integer or a string, it
> > works fine. I'm not sure how it's getting cast to unicode, but I think
> > I can work around this.
>
> How is your model defined?  Maybe the column is incorrectly defined in
> the model or if you use autoload then maybe there is a problem with the
> autoload code.
>
> I would also work around it, but provide some more details here in a new
> thread as it might point to a problem in SA.
>
> Werner

As I was working on creating my new thread, I realized that it's more
than likely that it's my fault. The value I am setting is derived from
what pay period I am currently viewing in my application. I figure
this out using a hack where I grab my frame's title. The title returns
unicode which is something that SQL Server doesn't like since the
field is set to varchar, not nvarchar. For some reason, this works
using pymssql, but not with SqlAlchemy. I will write a separate post
to that effect.

Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to