怎么批量生成数据库里的图片的略缩图呢?
<%
dim conn,connstr
on error resume next
set conn=server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("1.mdb")
conn.Open connstr
%>
<%
strsql="select * from N "
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn, 1, 1
%>
<% while not rs.eof %>
<%
Set Jpeg = Server.CreateObject("Persits.Jpeg") '创建实例
Path = Server.MapPath("<%=rs("name")%>") '处理图片路径
Jpeg.Open Path '打开图片
'调整宽度和高度为原来的50%
Jpeg.Width = Jpeg.OriginalWidth / 3
Jpeg.Height = Jpeg.OriginalHeight / 3
Jpeg.Save Server.MapPath("1/<%=rs("name")%>") '保存图片到磁盘
Jpeg.Close:Set Jpeg = Nothing
%>
<% rs.movenext
wend
rs.close
set rs=nothing
%>
我这样不行,不知代码错在那里