hello, i want to write a code in asp which displays records of submitted values by html page(using multiple checkbox selection).i am collecting all checkbox values in one variable.i have written following code but it is giving me error at line where i have given sql query. just see my which i have written as below
<!-- #include file="adovbs.inc"-->
<%
strIDs=request.form("chk1")
set con = Server.CreateObject("ADODB.Connection")
mydb = Server.MapPath("db/trycera.mdb")
con.mode=adModeReadWrite
con.connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& mydb &";Persist Security Info=False"
con.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& mydb &";Persist Security Info=False"
set rs=con.execute("select * FROM ulogin WHERE username IN " &"(" & strIDs & ")" )
rs.close
rs.locktype = adlockoptimistic
rs.cursortype = adopendynamic
rs.cursorlocation = aduseclient
rs.open
while not rs.eof
response.write (rs.fields("username"))
response.write(rs.field("verification"))
response.write(rs.fields("productid"))
rs.movenext
wend
%>
just see the code & tell me the changes.in this strIDs is contains usernames (in format like aaa,bbb,ccc). i have to show records of these users.
please tell me the code
<!-- #include file="adovbs.inc"-->
<%
strIDs=request.form("chk1")
set con = Server.CreateObject("ADODB.Connection")
mydb = Server.MapPath("db/trycera.mdb")
con.mode=adModeReadWrite
con.connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& mydb &";Persist Security Info=False"
con.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& mydb &";Persist Security Info=False"
set rs=con.execute("select * FROM ulogin WHERE username IN " &"(" & strIDs & ")" )
rs.close
rs.locktype = adlockoptimistic
rs.cursortype = adopendynamic
rs.cursorlocation = aduseclient
rs.open
while not rs.eof
response.write (rs.fields("username"))
response.write(rs.field("verification"))
response.write(rs.fields("productid"))
rs.movenext
wend
%>
just see the code & tell me the changes.in this strIDs is contains usernames (in format like aaa,bbb,ccc). i have to show records of these users.
please tell me the code