急!高手请留步!请教asp+access网站提交数据出错...

lq200409587 2010-09-20 11:40:40
运行环境是WIN2003 iis6.0
从此页面
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>注册页面</title>
<style type="text/css">
.STYLE1 {color: #FF0000}
#form1 table tr th {
font-size: 14px;
text-align: left;
}
</style>
</head>

<body>
<table width="800" border="0" align="center">
<tr>
<th width="119" height="119" scope="col"> </th>
<th width="267" scope="col"> </th>
<th width="268" scope="col"> </th>
<th width="122" scope="col"> </th>
</tr>
<tr>
<td height="78"> </td>
<td colspan="2"> </td>
<td> </td>
</tr>
<tr>
<td height="340"> </td>
<td colspan="2"><form id="form1" name="form1" method="post" action="result.asp">
<table width="500" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#666666">
<tr>
<th colspan="3" scope="col">请在下面填写您的注册资料,红色<span class="STYLE1">*</span>号所标示的选项为必填项</th>
</tr>
<tr>
<td width="112" align="right" valign="middle">用户名:</td>
<td width="211"><label for="f_user"></label>
<input type="text" name="f_user" id="f_user" /></td>
<td width="139" valign="middle" class="STYLE1">*</td>
</tr>
<tr>
<td align="right" valign="middle">密码:</td>
<td><label for="f_code"></label>
<input type="password" name="f_code" id="f_code" /></td>
<td valign="middle"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right" valign="middle">姓名:</td>
<td><label for="f_name"></label>
<input type="text" name="f_name" id="f_name" /></td>
<td valign="middle"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right" valign="middle">性别:</td>
<td><label for="f_sex"></label>
<select name="f_sex" id="f_sex">
<option>男</option>
<option>女</option>
</select></td>
<td valign="middle"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right" valign="middle">年龄:</td>
<td><label for="f_age"></label>
<input name="f_age" type="text" id="f_age" size="8" /></td>
<td valign="middle"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td colspan="3" align="center"><input type="submit" name="Submit" id="Submit" value="提交注册资料" />
     
<input type="reset" name="Submit2" id="Submit2" value="重置表单" /></td>
</tr>
</table>
</form></td>
<td> </td>
</tr>
<tr>
<td height="72"> </td>
<td colspan="2"> </td>
<td> </td>
</tr>
</table>
</body>
</html>



提交到此页面
<!--#include file="db.inc.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>返回页面</title>
<style type="text/css">
<!-
body {
margin-top: 0px;
margin-bottom: 0px;
background-image: url();
background-repeat: no-repeat;
}
-->
</style>
</head>
<body>
<table width="800" border="0" align="center" cellspacing="0">
<tr>
<td width="218" height="72"> </td>
<td width="376"> </td>
<td width="200"> </td>
</tr>
<tr>
<td> </td>
<td align="center" valign="middle">
<% set rst=Server.CreateObject("ADODB.recordset")
set rst1=conn.Execute("insert into user (u_user,u_code) values('"& request.Form("f_user")&"','"& request.Form("f_code")&"')")%>
<img src="img/zcsb.jpg" alt="注册失败" width="355" height="240" /><br>
<img src="img/zccg.jpg" alt="注册成功" width="357" height="229" /></td>
<td> </td>
</tr>
<tr>
<td height="154"> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>

localhost浏览器返回:
Microsoft OLE DB Provider for ODBC Drivers ?펳 '80004005'

[Microsoft][ODBC Microsoft Access Driver] ?ٗ?늹Ӄһ???鑯??

/result.asp??А 28

请教各位这咋回事??
在线等结....
...全文
34 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
lq200409587 2010-09-20
感谢楼上回复,最后查出来代码都没错,原因是.mdb文件没给写入权限...
不过还是感谢两位的热心帮助,分送你们了...
回复
ACMAIN_CHM 2010-09-20
<% set rst=Server.CreateObject("ADODB.recordset")
set rst1=conn.Execute("insert into user (u_user,u_code) values('"& request.Form("f_user")&"','"& request.Form("f_code")&"')")%>

改成如下
<%conn.Execute "insert into [user] (u_user,u_code) values('"& request.Form("f_user")& "','" & request.Form("f_code")& "')" %>
回复
wwwwb 2010-09-20
set rst1=conn.Execute("insert into [user] (u_user,u_code) values('"& request.Form("f_user")&"','"& request.Form("f_code")&"')")%>

将SQL语句贴出来看看
回复
相关推荐
发帖
Access
创建于2007-09-28

7516

社区成员

Microsoft Office Access是由微软发布的关系数据库管理系统。它结合了 MicrosoftJet Database Engine 和 图形用户界面两项特点。
申请成为版主
帖子事件
创建了帖子
2010-09-20 11:40
社区公告
暂无公告