ASP图片显示代码如下

来源:百度知道 编辑:UC知道 时间:2024/05/06 00:50:24
记录集如下:
<%
Dim rs
Dim rs_numRows

Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_conn_STRING
rs.Source = "SELECT * FROM shop ORDER BY id ASC"
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 1
rs.Open()

rs_numRows = 0
%>

图片显示如下:
<%if rs.bof and rs.eof then
response.write"!"%>

<%
do while not rs.eof
%>
<tr><td><%=(rs.Fields.Item("shoppic").Value)%></td>
<%
rs.movenext
%>
<td><%=(rs.Fields.Item("shoppic").Value)%></td></tr>
<%
rs.movenext
loop
%>

<% end if %>

<%
rs.Close()
Set rs = Nothing
%>

结果是什么也不显示也不提示出错,,我这是那里做错了
<%if rs.bof and rs.eof then
response.write"!"%>
'_____

<%if rs.bof and rs.eof then
response.write"!"%>
'_____________________
'这里加个else
<%else%>
'____________________
<%
do while not rs.eof
%>

<%=(rs.Fields.Item("shoppic").Value)%>
换成
<%=Rs("Shoppic")%>
看看

你这种写法基本都是vb的了