SmileeTiger
Programmer
Hi I have a ASP form created that accesses a database and displays an item from it based upon checkboxes below is the code I have used and the database:<br><br>Database:<br>Name Number<br>Mac 2<br>Windows_95-98 3<br>Windows_NT 5<br><br>Form code:<br><br><br><form action="CompleteSurvey.asp" method="POST"><br> <input type="CHECKBOX" name="Platforms" value="Mac">MacOS<br><br> <input type="CHECKBOX" name="Platforms" value="Windows_95-98">Windows 95/98<br><br> <input type="CHECKBOX" name="Platforms" value="Windows_NT">Windows NT<br><br>bla bla bla<br><br>ASP Code<br><%<br>Platforms=request.form("Platforms"<br>DIM splitIT<br>DIM k<br>DIM i<br>splitIT = SPLIT( Platforms, "," )<br>FOR k = 0 TO UBOUND( splitIT )<br>set conn=server.createobject("ADODB.connection"<br>set objRS = server.createobject("ADODB.recordset"<br>conn.open "DSN=SN_Reg_System"<br>SQLstmt = "select Number from Survey where (Name = '" & splitIT(k) & "')"<br>Set objRS = conn.execute(SQLstmt)<br>if (objRS.BOF and objRS.EOF) then<br>response.write (splitIT(k))<br>response.write(": "<br>response.write ("An error has occured. "<br>response.end<br>End if<br>response.write(splitIT(k))<br>response.write(": "<br>Response.Write(objRS.Fields(0))<br>response.write("<br>"<br>conn.close<br>NEXT<br>%><br><br>I have checked all 3 checkboxes but it only displays the number for Mac (or whatever the first box that is checked off is.) I think I need to reset where ojbRS is in the database but I am not sure.<br><br><br><br>Thanks<br>Cory<br><br>