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

求助 ASP 提示这代码 rs.open sql,conn,1,1 这里至少有一个没有定义 问题出在哪里

cy5505chyu 发布于 2011-06-22 10:18, 427 次点击
<!--#include file="inc/conn.asp"-->
<%
Dim rs,sql
Dim id,title,content,tcontent,Pictuer
set rs=server.CreateObject("Adodb.RecordSet")
'参数是否正确
id=request.QueryString("id")
if  IsNumeric(id)=False or isnull(id) or id="" then
  response.write "参数传递错误"
  response.end
End if
sql="select title,content,tcontent,Pictuer from photo where id="&id
rs.open sql,conn,1,1
if not rs.eof then
 title=rs("title")
 content=rs("content")
 tcontent=rs("tcontent")
 Pictuer=rs("Pictuer")
else
response.write "无记录"
response.end()
end if
%>
2 回复
#2
tandezhong2011-06-22 12:23
检查 sql 这一句 有没有打错
#3
a370072011-06-27 15:38
<!--#include file="inc/conn.asp"-->
把你这个里面的代码贴出来
1