小妹有个有关asp与Access的问题,恳请高手帮助!

chywing 2004-05-05 06:48:32
Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft JET Database Engine 错误 '80040e07'

标准表达式中数据类型不匹配。

/shopingb.asp,行10

运行时出现以上代码,我的数据类型都是严格按标准来做的,就是不行,数据库中表名称及字段名称我用的是中文。

源代码:
<%
response.buffer=true
no=request("no")
dect=request("dect")
set cnn=server.createobject("adodb.connection")
ps="provider=microsoft.jet.oledb.4.0;data source="&server.mappath("购物广场.mdb")
cnn.open ps
set rst=server.createobject("adodb.recordset")
sql="select * from 商品陈列 where 分类号 ='"&no&"' order by 分类号"
rst.open sql,cnn,2,2
%>

顺便问问,rst.open sql,cnn,2,2,这句话对吗?
如果需要看数据库,请提出来。或者在QQ上让我提供,QQ号:8406644
不胜感激!!!!!!!
...全文
47 12 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
sn12345678 2004-05-05
  • 打赏
  • 举报
回复
如果数据库中“分类号”是数字类型的,select语句这样写试一下
sql="select * from 商品陈列 where 分类号 ="&cint(no)&" order by 分类号"
还有,你的分类号后是一样的,你"order by 分类号"有什么意义?不懂!
newhandtoo 2004-05-05
  • 打赏
  • 举报
回复
"分类号"在你的数据库中是不是定义了数值型?
no=request("no") 最好改成 no=trim(request("no"))
不加trim()的话它有时会带上"空格"的
newhandtoo 2004-05-05
  • 打赏
  • 举报
回复
在出错的行号前用
response.write "您想检验的数据"
response.end
来检查一下
loaddop 2004-05-05
  • 打赏
  • 举报
回复
把 sql="select * from 商品陈列 where 分类号 ='"&no&"'"&" order by 分类号"

change to:

sql="select * from 商品陈列 where 分类号 ="&no&" order by 分类号"

fishball 2004-05-05
  • 打赏
  • 举报
回复
分类号是数字型的看这样子可不可以
sql="select * from 商品陈列 where 分类号 ="&no&" order by 分类号"
擒兽 2004-05-05
  • 打赏
  • 举报
回复
mark
chywing 2004-05-05
  • 打赏
  • 举报
回复
我在数据库中分类号用的数字类型,no传递过来的值是什么,我就不知道了。。。。嘿。。。不懂
skyboy0720 2004-05-05
  • 打赏
  • 举报
回复
你的分类号什么类型,no传递过来的值是什么,打印出来看看!
fishball 2004-05-05
  • 打赏
  • 举报
回复
用[no]看看
tangzehuan 2004-05-05
  • 打赏
  • 举报
回复
no好像是关键字,最好不要用
chywing 2004-05-05
  • 打赏
  • 举报
回复
试过了,反映一样,没变化
fishball 2004-05-05
  • 打赏
  • 举报
回复
sql="select * from 商品陈列 where 分类号 ='"&no&"' order by 分类号"

这里打错了吧。
sql="select * from 商品陈列 where 分类号 ='"&no&"'"&" order by 分类号"

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧