asp运行sql 语句的问题

weilixya 2003-09-18 01:24:31
beforecount=(trim(request("page")-1))*pagesize

StrSQL="select top 20 * from xxxx where item_id not in (select top "&beforecount&" item_id from xxxx)"

在第二条语句"&beforecount&" 出错!将"&beforecount&" 换成数字则运行通过

在线等
...全文
27 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
weilixya 2003-09-19
  • 打赏
  • 举报
回复
狂晕ing

response.write(beforcecount)

-20

上面一条语句有问题,7456,小白了一回。。。。汗~~~~~~
alan815 2003-09-18
  • 打赏
  • 举报
回复
beforecount=(cint(trim(request("page")))-1)*cint(pagesize)
weilixya 2003-09-18
  • 打赏
  • 举报
回复
beforecount=Cint(beforecount)

还是不行,我哭啊
不老书生 2003-09-18
  • 打赏
  • 举报
回复
beforecount打印出来看看是什么!

beforecount=Cint(beforecount)
weilixya 2003-09-18
  • 打赏
  • 举报
回复
Cint(request("page"))我式了一下,还是不行,晕了
bananasmiling 2003-09-18
  • 打赏
  • 举报
回复
beforecount=(cint(request("page"))-1)*pagesize

StrSQL="select top 20 * from xxxx where item_id not in (select top "&beforecount&" item_id from xxxx)"


peering08cn 2003-09-18
  • 打赏
  • 举报
回复
学习
weilixya 2003-09-18
  • 打赏
  • 举报
回复
StrSQL="select top 20 * from xxxx where item_id not in (select top "&cstr(beforecount)&" item_id from xxxx)"

我式过了不行!
jzywh 2003-09-18
  • 打赏
  • 举报
回复
Cint(request("page"))

把字符串转换成整型
cqfeng 2003-09-18
  • 打赏
  • 举报
回复
try:

StrSQL="select top 20 * from xxxx where item_id not in (select top "&cstr(beforecount)&" item_id from xxxx)"

28,406

社区成员

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

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