<% option Explicit const adopenforwardonly=0 const adlockreadonly=1 const adcmdtext=1 dim cn,cnstr Set cn = Server.CreateObject("ADODB.Connection") cnstr="provider=microsoft.jet.oledb.4.0;" cnstr=cnstr & "data source=c:\inetpub\wwwroot\stud_asp_example\sem6_2002\c208\kim.mdb;" cn.connectionstring=cnstr cn.Open dim rs, sql set rs=Server.CreateObject("ADODB.recordset") sql="select*from data order by dato;" rs.open sql, cn,adopenforwardonly,adlockreadonly,adcmdtext %>
Alle dem der har skrevet sig ind i vores gæstebog
navne
efternavn
dato
<% do until rs.eof response.write"
" response.write"
"& rs.fields("navn") & "
" response.write"
"& rs.fields("efternavn") & "
" response.write"
"& rs.fields("dato") & "
" response.write"
" rs.movenext loop rs.close set rs=nothing cn.close set cn=nothing %>