作者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
→ yauhh:顯然就是optionvalue或Search有時會缺值啊218.160.109.138 03/23 22:26
推 lickpurple:為何不 response.write(sql) 114.36.4.250 03/24 01:06
→ lickpurple:這樣不就知道字串是否正常了 114.36.4.250 03/24 01:06
推 kami1119:response.write 後 response.end 114.42.86.137 03/30 23:59