标题:[求助]asp+access非常郁闷的错误,本人新手.
取消只看楼主
adong
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-7-8
 问题点数:0 回复次数:2 
[求助]asp+access非常郁闷的错误,本人新手.

我在网上下了一个高考查询的系统,想把他改来用作通讯录查询,,原来的准考证号哪一栏改为手机号码.可是我一旦输入的位数超过9时就会出错..
错误类型:
Microsoft JET Database Engine (0x80040E57)
溢出
/gao/write.asp, 第 74 行

我在数据库里把数据类型由原来的数字改为文本或备注一样不行,,郁闷很..简直要疯了..谁可以帮我看下的..万分感谢.最好是加我QQ:318016909 我把源文件发给你,,加数据库只有13个文件,,,在线等.


下面是搜索源文件..
<!--#include file="conn.asp"-->
<%

dim action,kaohao

action=request("action")
if action="search" then
call search()
%>

<%sub search()

kaohao=request("kaohao")
if kaohao="" then
response.write("<script language='javascript'>")
response.write("alert('考试号不能为空,请返回!');")
response.write("history.go(+1);")
response.write("</Script>")
response.end
end if

dim rs
sql="select id,考试号,姓名,性别,分数,类别,录取专业,籍贯 from [data] where 考试号="&kaohao
set rs=conn.execute(sql)

if rs.eof then
response.write("<script language='javascript'>")
response.write("alert('考试号有误或还没有您的信息,请返回!');")
response.write("history.go(+1);")
response.write("</Script>")
response.end
end if

dim kaohao,name,sex,fen,lei,zhuan,jiguan
set kaohao=rs(1)
set name=rs(2)
set sex=rs(3)
set fen=rs(4)
set lei=rs(5)
set zhuan=rs(6)
set jiguan=rs(7)
%>
<p align="center"><b><font size="5">高考录取查询系统</font></b> </p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="14%">准考证号</td>
<td width="14%">姓名</td>
<td width="14%">性别</td>
<td width="14%">分数</td>
<td width="14%">类别</td>
<td width="15%">录取专业</td>
<td width="15%">籍贯</td>
</tr>
<tr>
<td width="14%"><%=kaohao%> </td>
<td width="14%"><%=name%> </td>
<td width="14%"><%=sex%> </td>
<td width="14%"><%=fen%> </td>
<td width="14%"><%=lei%> </td>
<td width="15%"><%=zhuan%> </td>
<td width="15%"><%=jiguan%> </td>
</tr>
</table>
<p align="center"><a href="search.asp">返回</a><br>
<br>
</p>
<%
rs.close
set rs=nothing
conn.Close
Set conn = Nothing
end sub%>

<%else%> </p>

<p align="center"> </p>
<p align="center"><b><font size="5">高考录取查询系统</font></b> </p>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="60%" id="AutoNumber2">
<form method="POST" action="search.asp?action=search" name=frmAnnounce >
<tr>
<td width="25%">输入考试号</td>
<td width="75%"><input name="kaohao" type="text" size="25" maxlength="100"></td>
</tr>
<tr>
<td width="25%"> </td>
<td width="75%"><input type="submit" value="搜索" name="B1"></td>
</tr>
</table>
</center>
</div>
<p> </p>
<%end if%>

搜索更多相关主题的帖子: access asp 
2007-07-08 21:19
adong
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-7-8
得分:0 

<!--#include file="conn.asp"-->
<%dim adminlogin
adminlogin=session("adminlogin")
if adminlogin<>true then

response.write("<script language='javascript'>")
response.write("alert('您没有登录,请登录!');")
response.write("history.go(-1);")
response.write("</Script>")
response.end

end if%>
<%


dim action
action=request("action")
if action="save" then
call save()
%>
<%
sub save()

dim kaohao,name,sex,fen,lei,zhuan,jiguan
kaohao=request.form("kaohao")
name = request.form("name")
sex = request.form("sex")
fen = request.form("fen")
lei = request.form("lei")
zhuan = request.form("zhuan")
jiguan = request.form("jiguan")

if kaohao="" then
response.write("<script language='javascript'>")
response.write("alert('考试号不能为空,请返回!');")
response.write("history.go(-1);")
response.write("</Script>")
response.end
end if
if name="" then
response.write("<script language='javascript'>")
response.write("alert('姓名不能为空,请返回!');")
response.write("history.go(-1);")
response.write("</Script>")
response.end
end if
if fen="" then
response.write("<script language='javascript'>")
response.write("alert('考分不能为空,请返回!');")
response.write("history.go(-1);")
response.write("</Script>")
response.end
end if
if lei="" then
response.write("<script language='javascript'>")
response.write("alert('分类不能为空,请返回!');")
response.write("history.go(-1);")
response.write("</Script>")
response.end
end if
if zhuan="" then
response.write("<script language='javascript'>")
response.write("alert('录取专业不能为空,请返回!');")
response.write("history.go(-1);")
response.write("</Script>")
response.end
end if

sql="insert into [data] (考试号,姓名,性别,分数,类别,录取专业,籍贯) values ('"&kaohao&"','"&name&"','"&sex&"','"&fen&"','"&lei&"','"&zhuan&"','"&jiguan&"')"
conn.execute(sql)

conn.Close
Set conn = Nothing
end sub
%>

<p align="center">添加成功! <a href="write.asp">请返回</a>
<%else%> <b><font size="5">添加考生录取信息</font></b> </p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<form method="POST" action="write.asp?action=save" name=frmAnnounce >
<tr>
<td width="14%">准考证号</td>
<td width="14%">姓名</td>
<td width="14%">性别</td>
<td width="14%">分数</td>
<td width="14%">类别</td>
<td width="15%">录取专业</td>
<td width="15%">籍贯</td>
</tr>
<tr>
<td width="14%"><input name="kaohao" type="text" size="25" maxlength="100"></td>
<td width="14%"><input type="text" name="name" size="12"></td>
<td width="14%"><input type="text" name="sex" size="5"></td>
<td width="14%"><input type="text" name="fen" size="10"></td>
<td width="14%"><input type="text" name="lei" size="10"></td>
<td width="15%"><input type="text" name="zhuan" size="12"></td>
<td width="15%"><input type="text" name="jiguan" size="12"></td>
</tr>
<tr>
<td width="70%" colspan="5"> </td>
<td width="30%" colspan="2"><input type="submit" value="提交" name="B1"></td>
</tr>
</table>
<%end if%>

2007-07-08 21:26
adong
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-7-8
得分:0 

太感谢了..有人理我了..你看有没有必要打个包把文件发给你...文件很小

2007-07-08 21:29



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-153817-1-1.html




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

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