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