哈哈我终于找到解决的办法了.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回复的差不多
不过这种方法不行呀,我在PHP3和php4下都试了,都不成
我用的连接方式不是ODBC,而是用mssql_connect,这个函数所连接到的数据库和设置ODBC部分有关系么。
的做法事对的话,对应的也有mysql选项--对应改就行了。
也在php.ini理头。
你用两个TEXT类型的字段来存你的信息,不让它超出4k,
操作就没问题了!
高手们,哪里去了。
有英文好的朋友帮忙去www.php.net问问,我实在是英文不好,不然我就自已去问了。
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回复的差不多