我是asp的初学者,我在使用这段代码时遇到了麻烦。我已经尝试了很多次调试,但它仍然无法正常工作。当我运行代码时,它显示内部服务器错误 500。我不确定出了什么问题。如果我删除这段代码,它将起作用。有人可以帮助我并指出正确的方向吗?请?
<%
strSQL = "SELECT _id,name,price,out_of_stock FROM class_product WHERE purchase_form = 1 ORDER BY _rank ASC"
OpenMainConn()
set rsProducts = Server.CreateObject("ADODB.Recordset")
rsProducts.Open strSQL, MainDBConn
dim count
if not rsProducts.eof then
dim exceptions
while not rsProducts.eof
count = count + 1
exceptions = exceptions & "product" & count & ","
%>
<tr>
<td>
<%=(rsProducts("name"))%>
</td>
<td align="right">
<%=(FormatCurrency(rsProducts("price"),2))%>
</td>
<td align="center">
<% if rsProducts("out_of_stock") = 0 then %>
<input type="text" class="input_text" style="width: 20px;" id="product<%=count %>" name="product<%=count %>" onchange="updateSub();" />
<% else %>
<img border="0" src="images/OUT-OF-STOCK.gif"/><input type="hidden" class="input_text" style="width: 20px;" id="product<%=count %>" name="product<%=count %>" onchange="updateSub();" />
<% end if %>
<input type="hidden" id="productDetails<%=count %>" name="productDetails<%=count %>" value="<%=(rsProducts("name") & "|" & rsProducts("price"))%>" />
</td>
</tr>
<%
rsProducts.movenext()
wend
end if
rsProducts.Close()
set rsProducts = nothing
CloseMainConn()
%>