页面转换问题,请教!出了错

iampeterxu 2003-08-22 09:53:40
请教一个asp页面转换问题。
在edit.asp中有如下代码:
<form method="POST" action="editsucceed.asp?revise=<%=rsc.fields.item("s_id").value%>" >
在editsucceed.asp中有如下代码:
sid=request("revise")
set rso=server.CreateObject("ADODB.CONNECTION")
rso.open DATASTRING '(include中已经插入)
set ars=server.CreateObject("ADODB.Recordset")
sql="select * from score where s_id=" & clng(sid) &""
ars.open sql,rso,3,3,2

请问哪位同仁知道错在哪儿了,谢谢!!
主要功能在于修改数据库score表中制定id的纪录。
...全文
58 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
calfhfah 2003-08-23
  • 打赏
  • 举报
回复
ars.open sql,rso,3,3,2

不 懂
hzqq 2003-08-22
  • 打赏
  • 举报
回复
sql="select * from score where s_id=" & clng(sid) &""
asp不会把数字自动转换成字符
sql="select * from score where s_id=" & cstr(sid) &""
在sql语句中,变量没有引号就是数值类型
changechange 2003-08-22
  • 打赏
  • 举报
回复
倒,这样写法不出错才怪

sql="select * from score where s_id=" & cstr(sid) &""

还差不多
ronanlin 2003-08-22
  • 打赏
  • 举报
回复
提示什么出错信息,s_id是什么类型??
aloxy 2003-08-22
  • 打赏
  • 举报
回复
sql="select * from score where s_id='" & clng(sid) &"'""
aloxy 2003-08-22
  • 打赏
  • 举报
回复
sql="select * from score where s_id='" & clng(sid) &"'"

28,390

社区成员

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

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