十万火急!怎样在ASP中读出数据库文件

xinyue 2000-04-14 02:48:00
在ASP中,将html文件存入数据库中,但在取出时,文件中的空格已被删除和其后面的内容均被删除,使用server.htmlencode之后确不能正确显示格式,若利用cbuilder应用程序中TPageProducer自动生成html网页,其中的空格仍被删除,请问我该怎么办?
...全文
150 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
xzou 2000-04-14
  • 打赏
  • 举报
回复
select case mid(str,i,1)
case "<"
result=result+"<"
case ">"
result=result+">"
case chr(13)
result=result+"<br>"
case chr(34)
result=result+"""
case "&"
result=result+"&"
case chr(32)
'result=result+" "
if i+1<=l and i-1>0 then
if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or _
mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9) then result=result+" "
else
result=result+" "
end if
else
result=result+" "
end if
case chr(9)
result=result+" "
case else
result=result+mid(str,i,1)
end select
0D0A 2000-04-14
  • 打赏
  • 举报
回复
写入数据库时,就用' '代替空格
weity 2000-04-14
  • 打赏
  • 举报
回复
ADC.Server = "http://<%= Request.ServerVariables("SERVER_NAME") %>"
ADC.Connect = "DSN=ASCS_SQL;UID=OSCS02ADM;PWD=PORTPIA"
ADC.ExecuteOptions = adcExecSync
ADC.sql="自己定义的sql语句"
adc.refresh
if not adc.recordset.eof then
jname.value = adc.recordset("字段名")
else
'退出程序
end if

<object classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" ID="ADC" HEIGHT="1" WIDTH="1">
</object>
ADC 是一个adc组件
jname是自己定义的text文本控件
zdg 2000-04-14
  • 打赏
  • 举报
回复
html文件也是文本文件, 为什么不能放在数据库的"Text"字段呢???

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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