用ASP开发WEB数据库(SQL Server),如何管理图像信息?

hjf 2000-07-07 11:06:00
1,字段属性为“image",但不可编辑;
2,如果以路径方式管理图像,如何查询,并在网页上显示?

我是个新手,敬请各位大侠不吝赐教。
...全文
124 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
hnalbert 2000-07-07
  • 打赏
  • 举报
回复
1. How to get the picture from the input of the client side and how to write it into the corresponding field in the SQL Server table?(use Sql sentence only or use Active control?)
2. And how to show it to the client side when the client want to see it?

if somebody can give the answer in details (sample provided is the best) I will be very grateful!
堆堆 2000-07-07
  • 打赏
  • 举报
回复
<% dim conn,re
set conn=server.CreateObject ("adodb.connection")
conn.open "dsn=xx" 'xx为自己的DSN名
set re=conn.execute("select xx from xxx") 'xx为字段属性为“image"的字段名,xxx为表名
if re.eof=false then
Response.BinaryWrite (re.Fields.Item(0).GetChunk (re.Fields.Item(0).ActualSize ))
re.close
end if
conn.close
set re=nothing
set conn=nothing
%>

28,390

社区成员

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

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