python - Django and SQL Server - Error when charfield > 10 chars -
i'm using django 1.2.3 , django-pyodbc.
i receiving error when adding user length > 10chars:
the data types nvarchar , ntext incompatible in equal operator
whenever add user username of 10 characters or below works fine, same error emails.
any idea folks?
the user table:
create table [auth_user] ( [id] int identity (1, 1) not null primary key, [username] nvarchar(30) not null unique, [first_name] nvarchar(30) not null, [last_name] nvarchar(30) not null, [email] nvarchar(75) not null, [password] nvarchar(128) not null, [is_staff] bit not null, [is_active] bit not null, [is_superuser] bit not null, [last_login] datetime not null, [date_joined] datetime not null )
i had similar problem sql server 2008 , sql native client odbc driver. upgrading sql server 2008 r2 fixed problem. seemed caused issue results sqlgettypeinfo() odbc call wvarchar type including date/time types too.
Comments
Post a Comment