简体   繁体   English

如何在C#应用程序的嵌入式SQL Server CE数据库中存储长文本数据?

[英]How can I store long text data in embedded SQL Server CE database of C# application?

I am working on a C# application. 我正在使用C#应用程序。 I use an embedded SQL Server CE database. 我使用嵌入式SQL Server CE数据库。

I want to store long text data in that database, but there is limit of 4000 char on the nvarchar datatype in the SQL Server CE database ( .sdf ). 我想在该数据库中存储长文本数据,但是SQL Server CE数据库( .sdf )中的nvarchar数据类型限制为4000 char。

Is there any solution for it? 有什么解决办法吗? How can I store long text data in embedded C# application? 如何在嵌入式C#应用程序中存储长文本数据? or should i go for any other embedded database? 还是我应该去其他嵌入式数据库?

You can use the ntext data type in the SQL Server CE database. 您可以在SQL Server CE数据库中使用ntext数据类型。

This MSDN page contains more information: 此MSDN页面包含更多信息:

ntext: Variable-length Unicode data with a maximum length of (2^30–2)/2 (536,870,911) characters. ntext:可变长度Unicode数据,最大长度为(2 ^ 30–2)/ 2(536,870,911)个字符。 Storage size, in bytes, is two times the number of characters entered. 存储大小(以字节为单位)是输入字符数的两倍。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM