Paul ten Brink
Paul ten Brink

Reputation: 61

Can I use the SqlServer NTEXT data type in LightSwitch?

Can I use the SqlServer NTEXT data type in LightSwitch?

I know how to add extension business types, but they always subclass the existing LightSwitch base types. The LightSwitch base type 'String' maps to the SqlServer data type NVARCHAR which has a limit of 4000 characters (if I'm not mistaken).

I need more than 4000 characters!

Upvotes: 2

Views: 737

Answers (2)

Aaron Bertrand
Aaron Bertrand

Reputation: 280330

Since NTEXT is deprecated, in order to use the proper data type (NVARCHAR(MAX)) in LightSwitch, create the table in SQL Server and then attach to it as an external table from LightSwitch. Reference.

Upvotes: 1

Chains
Chains

Reputation: 13157

Paul -- Nvarchar(4000) is what lightswitch defaults, but you can change the properties of the field by clearing the maximum length field, which will change it to nvarchar(max). Nvarchar(max) can store about 2Gb (much, much more than 4000 characters!)

Upvotes: 4

Related Questions