我不知道我这样对不对,就是在注册的时候加了一个检查用户是否注册的按钮,可是我这样写提示我错误:
登陆用户名:
Microsoft JET Database Engine 错误 '80040e14'
FROM 子句语法错误。
/zhuce.asp,行 34
第34行为红字行........
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户注册</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
}
.style1 {font-family: "宋体"}
.style2 {font-size: 10pt}
.style4 {font-family: "宋体"; font-size: 10pt; }
-->
</style></head>
<body>
<div align="center">
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
</div>
<%
sub aaa()
db="/data/jituan.mdb"
user=request("textuser")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
sql="select * from user where user_id='"&user&"'"
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
if not rs.eof then
%>
<script language=javascript>
alert("该用户可以进行注册!")
</script>
<%else%>
<script language=javascript>
alert("该用户名已被占用!")
</script>
<%end if
rs.close
conn.close
set conn=nothing
end sub%>
<form name="form1" method="post" action="">
<div align="center">
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="38%"><div align="right" class="style1 style2">登陆用户名:</div></td>
<td width="62%"><div align="left" class="style4">
<input name="textuser" type="text" id="textuser" size="12" maxlength="12">
<input type="button" name="Submit3" value="检测用户名" onClick="<%call aaa()%>">
</div></td>
</tr>
<tr>
<td><div align="right" class="style4">用户密码:</div></td>
<td><div align="left" class="style4">
<input name="textfield2" type="text" size="12" maxlength="12">
</div></td>
</tr>
<tr>
<td><div align="right" class="style4">密码确认:</div></td>
<td><div align="left" class="style4">
<input name="textfield3" type="text" size="12" maxlength="12">
</div></td>
</tr>
<tr>
<td><div align="right" class="style4">用户姓名:</div></td>
<td><div align="left" class="style4">
<input name="textfield4" type="text" size="12" maxlength="12">
</div></td>
</tr>
<tr>
<td><div align="right" class="style4">所属区域:</div></td>
<td><div align="left" class="style4">
<input name="textfield5" type="text" size="12" maxlength="12">
</div></td>
</tr>
<tr>
<td><div align="right" class="style4">所属部门:</div></td>
<td><div align="left" class="style4">
<input name="textfield6" type="text" size="12" maxlength="12">
</div></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="34%"><div align="right">
<input type="submit" name="Submit" value="提交">
</div></td>
<td width="17%"> </td>
<td width="49%"><div align="left">
<input type="reset" name="Submit2" value="重置">
</div></td>
</tr>
</table></td>
</tr>
</table>
</div>
</form>
</body>
</html>
可以帮我看看问题出在那里了么....我真是太笨了...昨天找了一下午都没找出来...
还有就是谁能告诉我一般做用户注册检查界面都是用什么方法作阿??
我这种方法对么????谢谢大家.......................
等有空请大家吃饭啦......拜托咯..............
[此贴子已经被作者于2006-3-13 9:21:04编辑过]