| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 470 人关注过本帖
标题:代码错误?
只看楼主 加入收藏
huangwang
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2006-6-1
收藏
 问题点数:0 回复次数:1 
代码错误?

这个程序怎么改:
<!--#include file="conn.asp"-->
<%
id=request.form("id")
title=request.Form("title")
content=request.Form("content")
username=request.Form("username")

%>
<%


sql="insert into forum(title,content,username)values('"&title&"','"&content&"','"&username&"')"
conn.execute sql

%>
<%
sql="select * from forum where id=" & id
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
count=rs("answercount")+1
sql="update forum set answercount="&count&" where id=" & id
conn.execute sql
%>
<%
response.Redirect("show.asp")
%>

错误类型:
Microsoft JET Database Engine (0x80040E14)
语法错误 (操作符丢失) 在查询表达式 'id=' 中。
/huifu1.asp, 第 20 行

搜索更多相关主题的帖子: username content title 
2006-07-09 16:13
hangxj
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2045
专家分:0
注 册:2006-4-10
收藏
得分:0 
老问题,ID没有传值过来,自己检查一下

http://www./
2006-07-10 09:25
快速回复:代码错误?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.010911 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved