iapollo兄弟:
我这样做了怎么还不行:请帮我看一下程序:
//showimg.asp 我的数据表名为 ware 、其中字段image为图象字段
<!--#include file="Connections/hwsm.asp" -->
<%
Set Conn=Server.CreateObject("Adodb.Connection")
Conn.Open MM_txl_STRING
SQL="Select * From ware Where code='"&Request("id")&"'"
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open SQL,Conn,1,1
Response.ContentType = "image/*"
Response.BinaryWrite rs("image").getChunk(7500000)
Rs.Close
Conn.Close
%>
//下面是在一页里显示五行记录(包括图象)的程序
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/hwsm.asp" -->
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_hwsm_STRING
Recordset1.Source = "SELECT code, name, unit, price, image FROM dbo.ware"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 6
Dim Repeat1__index
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<table width="75%" border="1">
<tr>
<td width="26%">&nbsp;</td>
<td width="25%">&nbsp;</td>
<td width="41%">&nbsp;</td>
<td width="4%">&nbsp;</td>
<td width="4%">&nbsp;</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<tr>
<td width="26%"><%=(Recordset1.Fields.Item("code").Value)%> </td>
<td width="25%"><%=(Recordset1.Fields.Item("name").Value)%> </td>
<td width="41%"><%=(Recordset1.Fields.Item("unit").Value)%> </td>
<td width="4%"><%=(Recordset1.Fields.Item("price").Value)%></td>
<td width="4%">
<img src="showimg.asp?id=<%=(Recordset1.Fields.Item("code").Value)%>" alt="&ETH;&Icirc;&Iuml;ó&Otilde;&Otilde;,&iquest;á°&Eacute;!">
</td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</table>
</form>
</body>
</html>
<%
Recordset1.Close()
%>
怎么没有办法显示图象呢?
请帮我看看,好吗?先谢谢了!