odbc的原因,将你的odbc换为sql7.0的odbc

解决方案 »

  1.   

    补充一点,sql6.5及当时的odbc只允许255个字符,我想你现在用的是sql7.0,它最多允许8000个字符,但如果用odbc访问数据库,必需将odbc升级至sql7.0相应的版本
      

  2.   

    对不起,我有一个问题想问!
    我想通过freebsd+apache+PHP去ms sql server7.0的数据!
    我目前用了 freetds,phpdb等工具,编译运行没有问题,可是却不能和数据库连接!
    不知道,各位有没有什么办法连接?
    给我mail: [email protected],或者告诉我什么网站有这类的介绍!
      

  3.   

    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.