在需要分页的页面,点第2页,提示语法错误 (操作符丢失) 在查询表达式 'AnId =' 中。

在需要分页的页面,点第2页,提示语法错误 (操作符丢失) 在查询表达式 'AnId =' 中。,第1张

建立access的数据库news,还有表news,表的字段(id,title),id唯一,输入数据保存,用下面代码可查询,可分页

-----------------------下面保存为search.asp--------------------------

<html>

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312">

<title>文件</title>

</head>

<body bgcolor="#ffffff">

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<script>

function btn_ck_bh_Click()

{

var cx = document.form1.cxsj.value

form1.action ="search.asp?cx="+cx

}

</script>

<table border="1" cellspacing="0" bgcolor="#F0F8FF" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF" width="88%" style="word-break:break-all">

<tr>

<td width="778" align="center" colspan="7">

<form method="POST" name="form1" action=search.asp>

<p>输入搜索内容:<input type="text" name="cxsj" size="20"><input type="submit" value="提交" name="B1" LANGUAGE="javascript" onclick="btn_ck_bh_Click()">

<input type="reset" value="重写" name="B2"></p>

</form>

</td>

</tr>

</table>

<table border="1" cellspacing="0" bgcolor="#F0F8FF" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF" width="88%" style="word-break:break-all">

<tr>

<td width="8%" align="center"><strong><font color="#0080C0">ID 号</font></strong></td>

<td width="58%" align="center"><strong><font color="#0080C0">标 题</font></strong></td>

<td width="8%" align="center"><strong><font color="#0080C0">修 改</font></strong></td>

<td width="8%" align="center"><strong><font color="#0080C0">删 除</font></strong></td>

</tr>

<%

'数据库查询

'获得搜索内容

cx = request("cx")

dim pageCount

'把page转换成整数

page = cint(request("page"))

set conn=server.createobject("adodb.connection")'

set rs=server.createobject("adodb.recordset")

conn.open "DBQ=" &server.mappath("./news.mdb") &"DefaultDir=DRIVER={Microsoft Access Driver (*.mdb)}"

' 获取产品的名字记录集(从 news表中)

if cx <>"" then

sql = "select * from news where title like '%"&cx&"%' order by id desc"

else

sql ="select * from news order by id desc"

end if

rs.open sql,conn,3,3

'如果没有数据记录

if rs.bof then

errmsg=errmsg+"<br>"+"<li>"+keyword+"没有记录,请返回!!"

response.write errmsg

response.end

end if

' 设置记录集在每页的总行数,也就是 PageSize属性

RS.PageSize=40

'把rs.pageCount转换成整数和page才能作比较

pageCount = cint(rs.pageCount)

' 设置当前的页号( AbsolutePage属性)

if page = 0 then

page =1

end if

RS.AbsolutePage = page

x=1

' 显示当前页中的所有记录( PageSize中设置的行数)

WHILE NOT RS.EOF AND NumRows<RS.PageSize

%>

<tr onmouseover="this.bgColor='#99ccff'" onmouseout="this.bgColor=''">

<td width="8%"><p align="center"><%=rs("id")%></td>

<td width="58%"><a href="view.asp?id=<%=rs("id")%>" target="_blank"><%=rs("title")%></a></td>

<td width="8%" align="center"><a href="edit.asp?id="<%=rs("id")%>>修 改</a></td>

<td width="8%" align="center"><a href="delet.asp?id="<%=rs("id")%>>删 除</a></td>

</tr>

<%RS.MoveNext

NumRows=NumRows+1

WEND%>

<tr onmouseover="this.bgColor='#99ccff'" onmouseout="this.bgColor=''">

<td width="105%" align="center" colspan="6"></td></tr>

<tr>

<td width="105%" align="center" colspan="6">

<p align="center"><FONT color=#333333>共<%=PageCount%>页 第<%=page%>页★

<%if page=1 then%>首页<%end if%>

<%if page>1 then%>

<A HREF="search.asp?page=1&cx=<%=cx%>">首页</A>

<%end if%>★

<%if page>1 then%><A HREF="search.asp?page=<%=page-1%>&cx=<%=cx%>"><%end if%>上一页</a>

<%

dim pagewhere

dim p

p = 1

'把pagewhere转换成整数

'pagewhere = cint(request("pagewhere"))

pagewhere = pageCount

if pagewhere>0 then

for p=1 to pagewhere

if p <>page then%>

<A HREF="search.asp?page=<%=p%>&cx=<%=cx%>"><%=p%></a>

<%end if

if p =page then%>

<%=p%>

<% end if

next

end if%>

<%if page <PageCount then%>

<A HREF="search.asp?page=<%=page+1%>&cx=<%=cx%>">

<%end if %>下一页</A>★

<%if page=PageCount then%>尾页

<%end if%>

<%if page<PageCount then%>

<A HREF="search.asp?page=<%=PageCount%>&cx=<%=cx%>">尾页</A>

<%end if%>

</p></FONT></td></tr><tr>

<td width="105%" align="center" colspan="6">搜索内容:<%=cx%></td>

</tr>

</table></center></div>

</body></html>

<%

rs.close

Set rs=nothing

conn.close

set conn=nothing

%>

办理健康证,一般来说是检查常见的,胸片,心电图,肝功能,肾功能,血常规,等这些检查的,当然,还有一些,体格检查,比如检查视力,听力。

需要空腹,不能吃东西去进行检查的,检查前三天,不要进行过分激烈的运动,不能喝酒,以免肝功能损伤,通不过。

健康证规定持证人一年进行一次健康检查。

健康证的种类分为两种:一种是普通健康证。则另一种是食品健康证,是做饮食行业的人所需要的健康证。

扩展资料:

健康证的办理流程:

1、带身份证和个人免冠一寸彩色照片2张,到收费处缴纳体检费,领取体检表,粘贴照片(另一张领健康证用)、填写好姓名、性别等基本情况。

2、检验室采血、大便肛拭化验。

3、内、外科常规体检。

4、x光胸透。

5、完成全部体检项目。

6、查体结果符合发放健康证条件的,经卫生监督机构组织的卫生法律法规知识培训合格后,发放健康证。查体结果不符合发放健康证条件的,不予办理健康证。

参考资料来源:百度百科—健康证


欢迎分享,转载请注明来源:优选云

原文地址:https://54852.com/hy/657392.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-13
下一篇2023-05-13

随机推荐

发表评论

登录后才能评论
保存