作者kigo6 (焦ㄚ逃)
看板Programming
标题[问题] ASP中SQL问题出错
时间Tue Mar 23 19:12:40 2010
小弟是刚接触ASP这块的新手
最近写了一个查询的网页 程式如下:
VideoNo= Request("VideoNo")
VideoTitle = Request("VideoTitle")
VideoContent = Request("VideoContent")
VideoPath = Request("VideoPath")
VideoDate = Request("VideoDate")
VidoType = Request("VidoType")
Search = Request("Search")
optionvalue =request("selection")
SQL = "Select * from Video where "& optionvalue & " = "& Search
rs.open SQL,cn,1,3
执行结果为:
查询运算式 '=' 中的 语法错误 (少了运算元)。
我已经找了许久,但还是找不出错误
因此特地来求助,希望板友能帮小弟解答,谢谢!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.117.143.211
1F:→ yauhh:显然就是optionvalue或Search有时会缺值啊218.160.109.138 03/23 22:26
2F:推 lickpurple:为何不 response.write(sql) 114.36.4.250 03/24 01:06
3F:→ lickpurple:这样不就知道字串是否正常了 114.36.4.250 03/24 01:06
4F:推 kami1119:response.write 後 response.end 114.42.86.137 03/30 23:59