ntext、text 和 image
用于存储大型非 Unicode 字符、Unicode 字符及二进制数据的固定长度和可变长度数据类型。Unicode 数据使用 UNICODE UCS-2 字符集。ntext可变长度 Unicode 数据的最大长度为 230 - 1 (1,073,741,823) 个字符。存储大小是所输入字符个数的两倍(以字节为单位)。ntext 在 SQL-92 中的同义词是 national text。text服务器代码页中的可变长度非 Unicode 数据的最大长度为 231-1 (2,147,483,647) 个字符。当服务器代码页使用双字节字符时,存储量仍是 2,147,483,647 字节。存储大小可能小于 2,147,483,647 字节(取决于字符串)。image可变长度二进制数据介于 0 与 231-1 (2,147,483,647) 字节之间。

解决方案 »

  1.   

    谢谢,我不是很明白你讲存取方法是什么,你是指我的存储过程吗?很简单,
    GetSP:
    create procedure get_html_byid
    @id charas
    select m_id,c_text from HtmlTableGO
    UpdateSP:
    create procedure update_html_byid
    @id char,
             @text ntextas
    update HtmlTable
             SET  c_text=@text
    WHERE m_id = @idGO
    有问题吗?
      

  2.   

    I am sorry, I have to reply in English. Because our project, I can not setup Chinese input in my work machine. I've tried your suggestion, I exec update SP in SQL Query Analyzer. Still get the same error.
      

  3.   

    Hi every one, I've found the solution for this problem, Thanks a lot for everybody's attention. 
    Cause:
    I use ADO.NET to call this store procedure, the problem is I have to use the fellow 
    method to creat parameter.dbHelper.GetParameter( "@text",DbType.String,1073741823,ParameterDirection.Input);
    dbParams[2].Value = "my long value"Not simplely,dbHelper.GetParameter("@text","my long value")But I am still confused because I've followed zjcxc(邹建)'s suggestion to do it in SQL Query Analyzer, also failed. Can anybody tell me why?
      

  4.   

    存储过程中调用时,你是否没有为字符串加N? 存储过程的存储调用,应该使用:exec 存储过程名 N'中文字符......这后面跟上大于8000个的中文字符'如果你使用下面的方式调用存储过程,那应该还是乱码.
    exec 存储过程名 '中文字符......这后面跟上大于8000个的中文字符'
      

  5.   

    把ntext改成text,然后改
    create procedure get_html_byid
    @id charas
    select m_id,c_text from HtmlTableGO
    UpdateSP:
    create procedure update_html_byid
    @id char,
             @text textas
    update HtmlTable
             SET  c_text=(@text)
    WHERE m_id = @idGO
    别忘了(),试一下