<%
dim connect, rs, sql
set connect = server.createobject("ADODB.Connection")
connect.open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &_
Server.MapPath("\perlphpasp\db\quiz.mdb"))
sql = "select * from thai01"
set rs = connect.execute(sql)
do while not rs.eof
response.write(rs("qid")&" - "&rs("question")&" : ")
response.write(rs("choice1")&" "&rs("choice2")&" ")
response.write(rs("choice3")&" "&rs("choice4"))
response.write(" : "&rs("ans")&"<br>")
rs.movenext
loop
connect.close
set rs = nothing
set connect = nothing
%>
จำนวน : 18 บรรทัด