<% Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("db/db.mdb") Set RecSet = Server.CreateObject("ADODB.Recordset") Visa = "SELECT TOP 3 * FROM kurser ORDER by datum asc" RecSet.Open Visa, Connect, 3, 3 If RecSet.EOF Then response.write "Inga kurser inlagda" End if Do While NOT Recset.EOF if Recset("full") = 1 then response.write " " & Recset("titel") & " (Fullbokad)
" response.write "Kursstart: " & Recset("datum") & "
" response.write "
" else 'response.write " " & Recset("titel") & "
" response.write " " & Recset("titel") & "
" response.write "Kursstart: " & Recset("datum") & "
" response.write "
" end if Recset.MoveNext Loop Recset.Close Set Connect = Nothing %> Läs mer