Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在sql中存储大文本并在asp.net页面中显示_Asp.net_Sql Server - Fatal编程技术网

在sql中存储大文本并在asp.net页面中显示

在sql中存储大文本并在asp.net页面中显示,asp.net,sql-server,Asp.net,Sql Server,我想在Sql Server中存储大约50000个字符或更多的文本描述。我在应用程序中使用FCK编辑器和三层体系结构。然后我想检索数据并显示应用程序中的所有文本。如果描述很大,那么可以逐页显示 请建议。您可以选择数据类型nvarchar(max)varchar(max)可以在您的限制范围内存储2147483647个字符您可以使用文本数据类型 文本用于大块字符串数据 文字很好: If you need to store large texts in your database If you do n

我想在Sql Server中存储大约50000个字符或更多的文本描述。我在应用程序中使用FCK编辑器和三层体系结构。然后我想检索数据并显示应用程序中的所有文本。如果描述很大,那么可以逐页显示


请建议。

您可以选择数据类型nvarchar(max)

varchar(max)
可以在您的限制范围内存储2147483647个字符

您可以使用文本数据类型

文本用于大块字符串数据

文字很好:

If you need to store large texts in your database
If you do not search on the value of the column
If you select this column rarely and do not join on it.

如果您使用sql server 2005或2008作为数据库,请尝试文本数据类型。因为文本数据类型用于存储无限的字符串数据据我所知

您可以将整个数据存储在多行中,而不是存储为单个记录。保留列以标识表中的文件和行顺序

    Create table Textfiledata
    (
    File_ID Numeric(10,0),
    File_Data Varchar(8000),
    Order Numeric(10,0),
    )

insert into Textfiledata(1,"some text",0);
insert into Textfiledata(1,"some text",1);

我通过业务层发送数据,其中的代码如下:有一个大小,我给了10000,我需要它的长度可以是任意的。(文本应该通过业务层)localOutPutServer.BuildParameter(@lessonDesc),lessonDesc,DataServer.SQLDataType.SQLString,10000,ParameterDirection.Input);那么,我建议你更新你的业务层,不要完全限制。请看我上面的评论