回 帖 发 新 帖 刷新版面

主题:Microsoft VBScript 运行时错误

Microsoft VBScript 运行时错误 (0x800A01A8)缺少对象: ''/asp/Connections/TMPcqo2ggqgdc.asp, 第 15 行

<table border="1" cellpadding="5" cellspacing="0">
  <tr> 
    <td>id</td>
    <td>name</td>
    <td>pwd</td>
    <td>email</td>
    <td>question</td>
    <td>answer</td>
    <td>oicq</td>
    <td>icq</td>
    <td>msn</td>
    <td>url</td>
  </tr>
[color=FF0000] <% While ((Repeat1__numRows  <> 0) AND (NOT Recordset1.EOF)) %>[/color]这一块
  <tr> 
    <td><%=(Recordset1.Fields.Item("id").Value)%></td>
    <td><%=(Recordset1.Fields.Item("name").Value)%></td>
    <td><%=(Recordset1.Fields.Item("pwd").Value)%></td>
    <td><%=(Recordset1.Fields.Item("email").Value)%></td>
    <td><%=(Recordset1.Fields.Item("question").Value)%></td>
    <td><%=(Recordset1.Fields.Item("answer").Value)%></td>
    <td><%=(Recordset1.Fields.Item("oicq").Value)%></td>
    <td><%=(Recordset1.Fields.Item("icq").Value)%></td>
    <td><%=(Recordset1.Fields.Item("msn").Value)%></td>
    <td><%=(Recordset1.Fields.Item("url").Value)%></td>
  </tr>
  <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset1.MoveNext()
Wend
%>
</table>
<%
Dim Recordset1
Dim Recordset1_numRows

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

Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = 10
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>

请高手解决,急!!!!!

回复列表 (共2个回复)

沙发

<%=(Recordset1.Fields.Item("id").Value)%>

把有这样形式的括号都去掉看看

板凳

不对阿,你应该把后面的代码放到前面去,否则Recordset1对象还没有创建,怎么能使用呢

我来回复

您尚未登录,请登录后再回复。点此登录或注册