ERROR - The specified data type is not valid. [ Data type (if known) = varchar ]

5

I have recently installed SQL 2008 R2

CREATE TABLE TPERSONS(
personid int PRIMARY KEY NOT NULL,
lastname varchar(50) NULL,
firstname varchar(50) NULL,
salary money NULL,
managerid int NULL -- foreign key to personid
)

I do not understand why I receive this error.

Major Error 0x80040E14, Minor Error 26302

)
The specified data type is not valid. [ Data type (if known) = varchar ]
sql
sql-server
sql-server-2008-r2
sql-server-ce
asked on Stack Overflow Jun 11, 2013 by Alison Furnish • edited Jun 11, 2013 by RBarryYoung

1 Answer

18

The data type varchar is not one of the supported data types on SQL Server CE. You must use nvarchar.

Note that date is not supported, either. Use datetime instead.

answered on Stack Overflow Jun 11, 2013 by ErikE • edited Apr 29, 2020 by ErikE

User contributions licensed under CC BY-SA 3.0