注册 登录
编程论坛 ASP技术论坛

几个数值传递问题

inking0801 发布于 2011-02-05 23:11, 400 次点击
问题一
<input type="button" name="Submit" value="删除产品" onclick="javascript:if(confirm('确定删除?删除后不可恢复!')){window.location.href='a_cp_gl.asp?act=del&id=<%=rs("cpel_id")%>’;}else{history.go(0);}" />
<%
if request("act")="del" then
set rs=server.createobject("adodb.recordset")
id=Request.QueryString("id")
sql="select * from cpel where cpel_id like '%"&id&"%'"问题!!段使用cpel_id="&id报数值错误
rs.open sql,conn,2,3
rs.delete
rs.update
Response.Write "<script> alert('新闻刪除成功!');window.location.href='a_cp_gl.asp';</script>"
end if
%>
问题!在跳转回a_cp_gl.asp页面的时候需要传递CPEL_ID和NANE两个URL参数 怎们解决
问题二
此问题其实和问题一一样


SQ="select * from cpel where cpel_ss_cpyl like '%"&a&"%' 报错此段无法进行排序 "
3 回复
#2
hams2011-02-06 08:17
sql="select * from cpel where cpel_id like '%"&id&"%'"问题!!段使用cpel_id="&id报数值错误
先确定cpel_id字段的类型字符型要加引号

问题!在跳转回a_cp_gl.asp页面的时候需要传递CPEL_ID和NANE两个URL参数 怎们解决
&

SQ="select * from cpel where cpel_ss_cpyl like '%"&a&"%' 报错此段无法进行排序 "
还是先确定字段的类型,然后检查语法。
#3
inking08012011-02-06 17:35
回复 2楼 hams
exec="select * from cpjs where id="& request.QueryString("id")
说蓝色部分的错误  我想知道哪里错啦
#4
aspic2011-02-07 14:37
数据类型
1