注册 登录
编程论坛 ASP技术论坛

asp錯誤。ODBC不支持!

xunmi_love 发布于 2007-12-18 19:50, 848 次点击
<%
 set rvs=server.createobject("adodb.recordset")
  rvs.open"select * from xxhf where hid="& dd ,conn,1,1
 if rvs.eof then
 response.write"<tr><td align=center>現在還沒有回復。</td></tr>"
 response.end()
 end if
 do while not rvs.eof
 %>
 <tr>
   <td width="25%" height="20">姓名:<%=rvs("name")%><br>工號:<%=rvs("Hgonghao")%><br>回復時間:<%rvs=("Hshijian")%></td>
   <td><%rvs=("Hneirong")%></td>
    </tr>
 <%
 rvs.movenext
 loop
 rvs.close
 %>

跟我前一段時間寫的一樣!。怎麼還會有錯呢。是我沒有注意到那裡,還是怎麼樣。這一段代碼我看了一個多小時間!實在看不下去了。請教!!!!
4 回复
#2
motsoftmax2007-12-18 22:47
rvs.open"select * from xxhf where hid="& dd ,conn,1,1
改成:rvs.open"select * from xxhf where hid= '"& dd&"' ,conn,1,1
#3
xunmi_love2007-12-20 16:49
謝謝了

我覺的這兩種寫法是一樣的!我可能是裝了isapi_rewrite才搞出這樣的鳥問題!
不過現在我把它給干掉了@。。。。

然後就OK了!
#4
madpbpl2007-12-20 17:16
不是,这是是根据你的字段hid的数据类型来确定的,如果是数字,楼主的写法是对,如果是文本,2楼的写法正确。
#5
xunmi_love2007-12-22 16:23
謝謝樓上的解釋
1