ASP+Access数据库查询设置问题!

来源:百度知道 编辑:UC知道 时间:2024/06/30 21:36:22
确认的文件内容如下:
<%
id=Request("id")
pageno=trim(Request("pageno"))
findcontent=trim(request("findcontent"))
Approved =Request("Approved")
%>
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/#178mlm.mdb")
conn.execute="update (Hyclub) set IsApproved=true where id =" & cint(id)
%>
<%
set rs=nothing
set rs=server.CreateObject("adodb.recordset")
sql = "update from hyClub where Hyid = " & cint(HyID)
%>
<script language="javascript">
window.location.href="hyman.asp?pageno=<%=pageno%>&findcontent=<%=findcontent%>"
alert("◆≡≡≡系 统 提 示≡≡≡◆\n\n会员确认成功!");
</script>
<%
conn.close
set conn=nothing
%>
上一文件确认的

sql = "update from hyClub where Hyid = " & cint(HyID)
这句有问题,你是用update还是select,update语法不对
要是select
就改为sql = "select * from hyClub"

-------------------------------------------------------

改为

<%
id=Request("id")
pageno=trim(Request("pageno"))
findcontent=trim(request("findcontent"))
Approved =Request("Approved")
%>
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/#178mlm.mdb")
conn.execute="update (Hyclub) set IsApproved=true where id =" & cint(id)
%>
<%
set rs=nothing
set rs=server.CreateObject("adodb.recordset")
sql = "update from hyClub where "
%>
<script language="javascript">
window.location.href=&