我曾经碰到过,经过琢磨,现如下解决:
修改php.ini
[ODBC]
uodbc.defaultlrl=64000 ;4k=4096,我用了64k,呵呵,不能再大了。不知道够不够用。呵呵。我的[email protected]

解决方案 »

  1.   

    终于等到有人回答了,先谢谢你
    不过这种方法不行呀,我在PHP3和php4下都试了,都不成
    我用的连接方式不是ODBC,而是用mssql_connect,这个函数所连接到的数据库和设置ODBC部分有关系么。
      

  2.   

    我以前学过php3,如果the_east_key
    的做法事对的话,对应的也有mysql选项--对应改就行了。
    也在php.ini理头。
      

  3.   

    我又一个笨方法:
    你用两个TEXT类型的字段来存你的信息,不让它超出4k,
    操作就没问题了!
      

  4.   

    呵呵,这种方法当然不行,如果我的内容有1m呢,我岂不是要建256个字段。
    高手们,哪里去了。
    有英文好的朋友帮忙去www.php.net问问,我实在是英文不好,不然我就自已去问了。
      

  5.   

    哈哈我终于找到解决的办法了.the mssql module uses two parameters in php3.ini to control the size and
    limit of text columns.    mssql.textsize = 4096    (0-64kb)
        mssql.textlimit = 4096    (0-2Gb)try setting one or both params.The max total length of a row on MSSQLServer 6.5 is 1738 or so chars
    (~8100 on 7.0).  If you are inserting into a BLOB (VARCHAR or VARBINARY)
    you have to issue a set textsize=(up to 32768 or whatever the max
    configured in the SQLServer) statement to tell it the maximum amount you
    will transfer at a time.  Plus you have to do an insert on the row where
    the blob is to be stored and then a select to get the textpointer for
    the just inserted row followed by a writetext loop to insert the actual
    data.  You end up assembling a series of writetext statements with
    offsets, lengths, and data in the servers buffer then hit it with an
    execute.  It is not real clean but we do it all the time in production. 
    Have been using the same code since 4.21.08.  It came out in the
    SQLServer programmers toolkit as a VB image insert/read example.但是各位,我不知道如何给分了,只有The_east_key回复的差不多
      

  6.   

    谢谢大家的帮助与关心,The_east_key请到http://expert.csdn.net/TopicView.asp?id=30347领分