9

I need to store articles in an application for WP7. I just want to use a database so I can query by unread articles, etc, etc.

I've run into one big problem with SQL CE in Mango-- there seems to be a limit of 4000 characters, and my article is 4200. And that isn't even the biggest one.

How can I get around this limit, if at all? If not, will I have to use a different database or possibly just write stories to IsolatedStorage and manage the file references in the database?

Andrew M
  • 4,208
  • 11
  • 42
  • 67

2 Answers2

18

The 4000 byte limit is imposed on varchar fields.

If you want more then you'll need ot use ntext.

See the list of supported types at http://msdn.microsoft.com/en-us/library/ms172424(SQL.110).aspx

Hamish Smith
  • 8,153
  • 1
  • 34
  • 48
Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
  • Read https://stackoverflow.com/questions/2133946/nvarcharmax-vs-ntext for issues with using ntext. – harvzor May 25 '17 at 11:07
4

In Sql Compact 3.5, there was an ntext data type that was not limited to 4k bytes (like nvarchar).

Eric Farr
  • 2,683
  • 21
  • 30