一个出错程序,有人能解决吗?功能很简单 查询+更新
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/conn.asp" -->
<%
Dim RS
Dim RS_numRows
Set RS = Server.CreateObject("ADODB.Recordset")
RS.ActiveConnection = MM_conn_STRING
RS.Source = "SELECT A.id,A.s_num,B.stock_v,A.zj,A.USERID,b.stock_name,zj FROM gszj A,stock B WHERE A.stockid = B.stockid ORDER BY userid"
RS.CursorType = 0
RS.CursorLocation = 2
RS.LockType = 1
RS.Open()
RS_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 10
Repeat1__index = 0
RS_numRows = RS_numRows + Repeat1__numRows
%>
<table border="1" cellpadding="0">
<tr>
<td>编号</td>
<td>用户编号</td>
<td>今日收盘价</td>
<td>股票数量</td>
<td>该股资金</td>
</tr>
<% While ((Repeat1__numRows <> 0) AND (NOT RS.EOF)) %>
<tr>
<td><%=(RS.Fields.Item("id").Value)%></td>
<td><%=(RS.Fields.Item("USERID").Value)%></td>
<td><%=(RS.Fields.Item("stock_v").Value)%></td>
<td><%=(RS.Fields.Item("s_num").Value)%></td>
<td><p><%=FormatNumber(csng(rs("s_num"))*rs("stock_v"),2)%></p>
<p>
<%dim zijin
zijin=(rs("s_num"))*(rs("stock_v"))
rs("zj")="zijin"
rs.update
%>
</p></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
RS.MoveNext()
Wend
%>
<%
RS.Close()
Set RS = Nothing
%>