这ASP句子为啥报错呀!请教了!!
<%@ language=vbscript %>
<%
dim StrId
'接收ID
StrId=trim(request("itemno"))+","
Session("StrId")=StrId
if len(Session("StrId"))<>0 then
getID=Session("StrId")
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath("myDB/Datasource.mdb")
sql = "select * from Products where ID in ('"+getID.Substring(0,getID.Length-1)+"')"
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
%>
特别是这句:sql = "select * from Products where ID in ('"+getID.Substring(0,getID.Length-1)+"')"可能有错,我把它注释成这样是行的"select * from Products "'where ID in ('"+getID.Substring(0,getID.Length-1)+"')"
我主要想实现这样的SQL效果:select * from Products where ID (2,10,7,9)