好像是说ntext类型在ODBC 3.7版本和之前的版本不能用

解决方案 »

  1.   

    ODBC版本太低了,是不是低于3.7版本???
      

  2.   

    建议查找是否有新的ODBC驱动,不过我的Win2000自带的ODBC版本只有3.520:(
      

  3.   

    希望能对你有帮助:according to the people at php.net: "Unfortunately the ODBC functionality is based off of ODBC v2, which means NTEXT, TEXT, and pretty much any UNICODE is unknown to PHP. Marking this as closed as there is no way to really fix this, without overhauling the entire ODBC system (which is in progress, but no promises)" and another response to the same problem: "This is not an error in the MS SQL extension, as you are using ODBC functions to fetch data. Microsofts new datatypes ntext and nvarchar is not suported in the MS SQL extension, as they are not supported in Microsofts C-library. The will always be returned as a varchar with a max length of 255 bytes. " Fortunately I was able to come up with a cluggy solution. I solved it using a cast: SELECT cast ( field_name AS TEXT ) AS field_name. Unfortunately you must also run the following query PRIOR to running the select. @mssql_query( "SET TEXTSIZE 1024000", $db_connect); The TEXTSIZE sets the max length of field content that should be returned. Just thought I'd post a solution to something that was highly frustrating and annoying to me. I've received lots of help from php's community in the past and thought I'd give somrthing back ;-) Hope this helps someone .
      

  4.   

    http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q234/0/70.asp&NoWebContent=1