php从mssql7传出数据时会被截断?

hellbat 2000-03-04 02:12:00
php从mssql7传出数据时会被截断?是php的原因还是sql的原因
...全文
194 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
skt642 2001-05-31
  • 打赏
  • 举报
回复
48634关注!
yuanyingtanxi 2000-09-21
  • 打赏
  • 举报
回复
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.

skyxu 2000-04-24
  • 打赏
  • 举报
回复
对不起,我有一个问题想问!
我想通过freebsd+apache+PHP去ms sql server7.0的数据!
我目前用了 freetds,phpdb等工具,编译运行没有问题,可是却不能和数据库连接!
不知道,各位有没有什么办法连接?
给我mail: skyxu@163.net,或者告诉我什么网站有这类的介绍!
forgettor 2000-03-04
  • 打赏
  • 举报
回复
补充一点,sql6.5及当时的odbc只允许255个字符,我想你现在用的是sql7.0,它最多允许8000个字符,但如果用odbc访问数据库,必需将odbc升级至sql7.0相应的版本
forgettor 2000-03-04
  • 打赏
  • 举报
回复
odbc的原因,将你的odbc换为sql7.0的odbc

21,882

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧