设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 583|回复: 1
打印 上一主题 下一主题

[其它] 请教一个奇怪的问题

[复制链接]
跳转到指定楼层
1#
发表于 2004-7-28 01:19:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
真不好意思,对ACCESS不熟悉。

在使用的过程中出现了问题:

有一个文件中包含3个表,本来可以正常的查询,但是在增加了数千条记录以后,查询页面就出现500内部服务器错误。不知道是怎么回事。

怀疑:1、数据库记录太多?每个表大概3万条数据

          2、表名和列名都是中文?

          3、查询的like语句用的不对?



请各位高手指教!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
 楼主| 发表于 2004-7-28 01:21:00 | 只看该作者
<head>

<META http-equiv=content-type content="text/html; charset=gb2312">

<title>test</title>

</head>

<FORM action="test2.asp" method=post name=form1>

<table cellpadding="0" cellspacing="1" border="0" align="center">

<tr class="th">

  <td colspan=2><font align=center>信息检索</font></td>

</tr>

<tr>

  <td class=tdone style="text-align:center">关键字:</td>

  <td class=tdone style="text-align:left"><input type=text name="keyword" size="20" maxlength="20">(*)</td>

</tr> <tr align="center">

  <td colspan=2>

  <input type=submit value="开始">

  <input type=reset value="重填" >

  </td>

</tr>

</table>

</form>

</body>

</html>

以上是test1.asp<%

dim rcd

dim rcn

dim keywordkeyword = trim(request.form("keyword"))set rcn = server.createobject("ADODB.connection")

set rcd = server.createobject("ADODB.recordset")rcn.open "rovider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\new.mdb"'rcn.connectstring="dsn=test;uid=test;pwd=test"

set rcd.activeconnection = rcnrcd.cursorlocation = 3rcd.open "select * from 通讯录 where 姓名 like '%" & keyword & "%'"

if rcd.recordcount > 0 then

rcd.movefirst

for i = 1 to rcd.recordcount



response.write rcd.fields("姓名")

response.write rcd.fields("住址")

rcd.movenext

next

end if

rcd.close

%>

以上是test2.asp
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-6-5 17:27 , Processed in 0.090831 second(s), 25 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表