| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 627 人关注过本帖
标题:[求助]为何可读到Access的数据却不能添加记录
只看楼主 加入收藏
janefishfish
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2006-6-24
收藏
 问题点数:0 回复次数:1 
[求助]为何可读到Access的数据却不能添加记录

if request("send")="ok" then
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from Feedback "
rs.open sql,conn,2,3
response.write Request("Comments")
response.write request("title")
response.write Request("face")
response.write Request("pic")
response.write request("class")

response.end
rs.Addnew
rs("Comments")=Request("Comments")
rs.Update
rs.close
set rs=nothing
end if
%>
<HTML><HEAD>
<TITLE></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="book.css" type="text/css">
</HEAD>
<center>
<!--#include file="book_top.asp"-->

<table width="760" border=0 cellspacing=0 cellpadding=0 align=center bgcolor="#FFFFFF" class="grayline">
<tr><td align=center height=50>
<img border=0 src=images/write.gif>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=index.asp><img border=0 src=images/read.gif title="我要看留言"></a>
</td></tr>

<tr><td>
<form action=book_write.asp method=post name="book">
<table cellSpacing="1" borderColorDark="#ffffff" cellPadding="4" width="680" align="center" bgColor="#000000" borderColorLight="#000000" border="0">
<tr bgColor="#ebebeb">
<td width="20%" align=right>主题标题:</td>
<td ><input type=text name="title" size="30" maxlength=16>
<font color="#FF0000">*</font></td>
</tr>
<tr bgColor="#ebebeb">
<td width="20%" align=right>主题类型:</td>
<td ><select name="class">
<option>--主题类型--</option>
<option value="高考">高考</option>
<option value="中考">中考</option>
<option value="成人高考">成人高考</option>
<option value="报关考试">报关考试</option>
<option value="外语培训">外语培训</option>
<option value="远程教育">远程教育</option>

</select></td>
</tr>

<tr bgColor="#ebebeb">
<td width="20%" align=right>留言内容:<br><font color=red>(<%=maxlength%>字以内)</font></td>
<td><textarea name="Comments" rows="7" cols="66" style="overflow:auto;"></textarea></td>
</tr>
<tr bgColor="#ebebeb">
<td width="20%" align=right>请选择表情:</td>
<td>
<input type="radio" value="1" name="face" checked><img border=0 src="images/face/face1.gif">
<input type="radio" value="2" name="face"><img border=0 src="images/face/face2.gif">
<input type="radio" value="3" name="face"><img border=0 src="images/face/face3.gif">
<input type="radio" value="4" name="face"><img border=0 src="images/face/face4.gif">
<input type="radio" value="5" name="face"><img border=0 src="images/face/face5.gif">
<input type="radio" value="6" name="face"><img border=0 src="images/face/face6.gif">
<input type="radio" value="7" name="face"><img border=0 src="images/face/face7.gif">
<input type="radio" value="8" name="face"><img border=0 src="images/face/face8.gif">
<input type="radio" value="9" name="face"><img border=0 src="images/face/face9.gif">
<input type="radio" value="10" name="face"><img border=0 src="images/face/face10.gif">
<br>
<input type="radio" value="11" name="face"><img border=0 src="images/face/face11.gif">
<input type="radio" value="12" name="face"><img border=0 src="images/face/face12.gif">
<input type="radio" value="13" name="face"><img border=0 src="images/face/face13.gif">
<input type="radio" value="14" name="face"><img border=0 src="images/face/face14.gif">
<input type="radio" value="15" name="face"><img border=0 src="images/face/face15.gif">
<input type="radio" value="16" name="face"><img border=0 src="images/face/face16.gif">
<input type="radio" value="17" name="face"><img border=0 src="images/face/face17.gif">
<input type="radio" value="18" name="face"><img border=0 src="images/face/face18.gif">
<input type="radio" value="19" name="face"><img border=0 src="images/face/face19.gif">
<input type="radio" value="20" name="face"><img border=0 src="images/face/face20.gif">

</td>
</tr>
<tr bgColor="#ebebeb">
<td width="20%" align=right>请选择头像:</td>
<td>
<input type="radio" value="1" name="pic" checked><img border=0 src="images/face/pic1.gif" width=60>
<input type="radio" value="2" name="pic"><img border=0 src="images/face/pic2.gif" width=60>
<input type="radio" value="3" name="pic"><img border=0 src="images/face/pic3.gif" width=60>
<input type="radio" value="4" name="pic"><img border=0 src="images/face/pic4.gif" width=60>
<input type="radio" value="5" name="pic"><img border=0 src="images/face/pic5.gif" width=60>
<br>
<input type="radio" value="6" name="pic"><img border=0 src="images/face/pic6.gif" width=60>
<input type="radio" value="7" name="pic"><img border=0 src="images/face/pic7.gif" width=60>
<input type="radio" value="8" name="pic"><img border=0 src="images/face/pic8.gif" width=60>
<input type="radio" value="9" name="pic"><img border=0 src="images/face/pic9.gif" width=60>
<input type="radio" value="10" name="pic"><img border=0 src="images/face/pic10.gif" width=60>
</td>
</tr>
<tr bgColor="#ebebeb">
<td colSpan="2"><input type="submit" value="提交留言" name="Submit">
<input type="reset" value="重新填写" name="Submit2"><input type=hidden name=send value=ok></td>
</tr>
</table>
</form>

</table>


数据表Feedback
ID
title
class
pic
face
Comments

搜索更多相关主题的帖子: response Access write Comments 
2006-08-12 11:41
tang688
Rank: 5Rank: 5
等 级:贵宾
威 望:16
帖 子:1219
专家分:35
注 册:2004-12-25
收藏
得分:0 
第一不清楚你说的读到数据是指什么?
第二不清楚你说的不能增加它提示什么出错,出错行是那一行等?

2006-08-12 13:48
快速回复:[求助]为何可读到Access的数据却不能添加记录
数据加载中...
 
   



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

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